SonarQube Upgrade breaking - failed to assign an IP address to container

Must-share information (formatted with Markdown):

  • sonarqube-10.3.0+2009 App version 10.3.0
  • Helm deployment
  • Upgrading SonarQube from sonarqube-10.2.1+800 to 10.3.0+2009
  • Change the Chart version in the values.yaml

The container events show the following:

  • │ Warning FailedCreatePodSandBox 2m9s kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox “f5255f8e1d52301ca522ae38e50f131c51bc4db3ddb0173a8a7761 │
    │ 8a73ec7b2f”: plugin type=“aws-cni” name=“aws-cni” failed (add): add cmd: failed to assign an IP address to container

  • Describing the pod shows following error for the init Container:

    Container ID:  containerd://2314df2a4f77e8954569b3780fcd44a5609d11e6587e484c7a2b970c87c4f509
    Image ID:
    Port:          <none>
    Host Port:     <none>
    State:          Waiting
      Reason:       RunContainerError
    Last State:     Terminated
      Reason:       StartError
      Message:      failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown
      Exit Code:    128

Looks like we found the culprit or at least what fixed it for us. Bug?

We reverted this change back to sh

1 Like

Hi @samir.causevic,

welcome to our community! Thanks for posting your issue, I’ll try to give you some hints about the solution.

In the 10.3.0 release of the Helm chart, we changed the default image used by our initContainers. For example, in the case of init-sysctl, we moved from using the busybox image to our own (i.e., sonarqube). This is because we realized that multiple customers (like you, probably) need to scan and copy the images from DockerHub to their internal registries. Relying on one image in our helm chart will speed up this approval and copy process!

Coming back to your problem, the solution would be to set the SonarQube image to be the one used in the init-sysctl init container. You can achieve that by setting something like this in your values.yaml file

  enabled: true

Could you please try and give us feedback?

You might need to do the same for the other init containers, setting a similar value in initContainers.image.

1 Like