Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOSH Agent not reachable due to issues with blobstore settings #149

Closed
anshrupani opened this issue Apr 28, 2023 · 8 comments
Closed

BOSH Agent not reachable due to issues with blobstore settings #149

anshrupani opened this issue Apr 28, 2023 · 8 comments
Assignees

Comments

@anshrupani
Copy link

We identified some issues with the recent CPI version bumps, where the agent is not able to start due to missing blobstore properties. We guess these issues might have been triggered by #147.

On the outside, we see the following while deploying the director:

Deploying:
Creating instance 'bosh/0':
  Waiting until instance is ready:
    Post "https://mbus:<redacted>@<director-hostname>:6868/agent": dial tcp <director-ip>:6868: connect: connection refused

Here's what we observed in the agent logs on the director VM:

2023-04-27_14:38:07.96970 [main] 2023/04/27 14:38:07 ERROR - App setup Getting blobstore: Getting blobstore: Validating blobstore: executable bosh-blobstore- not found in PATH
2023-04-27_14:38:07.96971 [main] 2023/04/27 14:38:07 ERROR - Agent exited with error: Getting blobstore: Getting blobstore: Validating blobstore: executable bosh-blobstore- not found in PATH

The settings.json, on the other hand consists the following, which might be expected:
{{"blobstore":{"provider":"","options":null} }}

We observe this on AWS and GCP bosh-cpi releases (version 98 and 47 respectively). Azure (v44) also most probably has the issue, but we did not test it yet.

@beyhan
Copy link
Member

beyhan commented Apr 28, 2023

Some context/documentation about the blobstore settings is available in https://bosh.io/docs/agent-cpi-interactions/#agent-settings-format. @anshrupani is there no env with blobstore configuration in the settings.json? Like:

...
"env": {
    "bosh": {
      "authorized_keys": [
        "--AUTHORIZED KEY--"
      ],
      "blobstores": [
        {
...

@beyhan
Copy link
Member

beyhan commented Apr 28, 2023

I think what happens is that in create-env the bosh-cli is using this properties to configure the blobstore. The env in the settings.json is available for the VMs created by bosh director see. I think that create-env doesn't populate the env that is why after the removal in the blobstore properties are missing.

@ystros
Copy link
Contributor

ystros commented Apr 28, 2023

You need to set the blobstore settings under the env.bosh section of the manifest. Passing agent settings under this section has been standard for a while now. Previously, because the CPIs had their own set of blobstore properties, it would go through the code path @beyhan points out. Now that they have been removed, you must set them under env.bosh.

For bosh create-env environments, this is under resource_pools, whereas setting the properties for the CPI were under cloud_provider_section. An example in bosh-deployment:
https://github.com/cloudfoundry/bosh-deployment/blob/c62c8bd8265cef7534ba03d6c012601476304d87/bosh.yml#L158-L163

I'll add more obvious breaking change notes to each of the CPI releases

@beyhan
Copy link
Member

beyhan commented May 2, 2023

Ok, somehow I missed the reasource_pools option for bosh create-env. Good to know. In this case we should clean up the bosh.yml manifest in bosh-deployment. I created this pr. Or is there any other reason to keep blobstore properties under cloud_provider?

@beyhan
Copy link
Member

beyhan commented May 4, 2023

@anshrupani is this issue solved for you?

@anshrupani
Copy link
Author

Oh, thanks @beyhan and @ystros for pointing out the issue :)
We have indeed not updated our manifests. We will test it out and provide feedback soon.

@ramonskie
Copy link
Contributor

@anshrupani can we close this issue?

@anshrupani
Copy link
Author

Hi @ramonskie, @beyhan
We were blocked in our testing due to other issues, but we can confirm that suggestions provided by @ystros help.
We'll close the issue now.

@github-project-automation github-project-automation bot moved this from Pending Review | Discussion to Done in Foundational Infrastructure Working Group Jul 20, 2023
max-soe added a commit to max-soe/community that referenced this issue Jun 20, 2024
# Foundational Infrastructure: VM deployment lifecycle (BOSH) Contributions
### PRs Commented on/Reviewed:
- 2024-05-02T00:33:35Z: [Refactor the `client` package](cloudfoundry/bosh-s3cli#38)
### Issues that may be relevant:
- 2023-04-28T11:54:45Z: [BOSH Agent not reachable due to issues with blobstore settings](cloudfoundry/bosh-aws-cpi-release#149)
- 2023-05-15T09:53:53Z: [Update CONTRIBUTING.md](cloudfoundry/bosh#2443)
- 2023-05-16T08:07:09Z: [support instance tags and include relevant specs](cloudfoundry/bosh#2444)
- 2023-05-24T05:01:42Z: [Prevent gcc version check for non xenial stemcells](cloudfoundry/bosh-azure-cpi-release#685)
- 2023-05-31T17:49:02Z: [Support instance group tags](cloudfoundry/bosh#2448)
- 2023-07-24T14:07:16Z: [Efficient development with the bosh-agent](cloudfoundry/bosh-agent#312)
- 2023-08-14T14:17:13Z: [Enable support for verify-ca SSL mode for cases when hostname verification is not possible/required](cloudfoundry/bosh#2461)
- 2023-08-14T14:20:56Z: [Enable support for verify-ca SSL mode for cases when hostname verification is not possible/required](cloudfoundry/bosh#2462)
- 2023-08-17T11:42:28Z: [Use config properties with hyphens to prevent verification clashes in the agent](cloudfoundry/bosh-azure-storage-cli#9)
- 2023-08-17T11:53:04Z: [Unifying azure storage cli config across director and agent to prevent conflicts](cloudfoundry/bosh#2465)
- 2023-11-14T12:56:35Z: [Truncate downloaded blobs](cloudfoundry/bosh-azure-storage-cli#13)
- 2023-11-16T10:19:43Z: [Adding disaster recovery documentation for bosh in case of AZ outages](cloudfoundry/docs-bosh#815)
- 2023-12-18T14:27:56Z: [set server-side timeout for GET requests](cloudfoundry/bosh-azure-storage-cli#14)
- 2024-02-09T16:27:17Z: [retry CPI calls in case of SSL_read errors as well](cloudfoundry/bosh-azure-cpi-release#689)
- 2024-02-16T12:56:19Z: [fix failing unit tests](cloudfoundry/bosh-azure-cpi-release#690)
- 2024-04-24T12:44:52Z: [Revert ssl read workaround](cloudfoundry/bosh-azure-cpi-release#694)
- 2024-04-24T15:23:13Z: [support swift tempURLs](cloudfoundry/bosh-s3cli#37)
- 2024-05-02T13:58:07Z: [fix swift tempURLs and add unit/integration tests](cloudfoundry/bosh-s3cli#39)
### Code contributions:
- 2022-11-15T15:17:30Z: [Initial client offering Put functionality (cloudfoundry#2)](cloudfoundry/bosh-azure-storage-cli@9deb735)
- 2022-11-16T07:40:28Z: [initial get functionality (cloudfoundry#3)](cloudfoundry/bosh-azure-storage-cli@77df9a7)
- 2022-11-17T15:17:26Z: [initial exists functionality (cloudfoundry#6)](cloudfoundry/bosh-azure-storage-cli@e82b78b)
- 2023-05-23T05:52:41Z: [prevent gcc version check for fast_jsonparser for bionic and jammy stemcells](cloudfoundry/bosh-azure-cpi-release@dfc9402)
- 2023-05-24T05:05:08Z: [prevent gcc version check for fast_jsonparser for bionic and jammy stemcells](cloudfoundry/bosh-azure-cpi-release@dfc9402)
- 2023-07-24T13:57:00Z: [Efficient development with the bosh-agent](cloudfoundry/bosh-agent@3bba88a)
- 2023-07-24T14:09:00Z: [Efficient development with the bosh-agent](cloudfoundry/bosh-agent@3bba88a)
- 2023-08-14T14:06:32Z: [Enable support for verify-full SSL mode for cases when hostname verification is not possible/required](cloudfoundry/bosh@45a062f)
- 2023-08-17T11:39:50Z: [Use config properties with hyphens to prevent verification clashes in the agent](cloudfoundry/bosh-azure-storage-cli@1c46f43)
- 2023-08-17T11:45:44Z: [Unifying azure storage cli config across director and agent to prevent conflicts](cloudfoundry/bosh@d5cc637)
- 2023-11-16T10:12:44Z: [Adding disaster recovery documentation for bosh in case of AZ outages](cloudfoundry/docs-bosh@3427377)
- 2023-12-06T20:07:15Z: [updated docs](cloudfoundry/docs-bosh@7be327e)
- 2023-12-06T20:48:22Z: [updated docs](cloudfoundry/docs-bosh@7be327e)
- 2023-12-18T14:21:43Z: [set server-side timeout for GET requests](cloudfoundry/bosh-azure-storage-cli@759862b)
- 2023-12-18T15:09:12Z: [include comment for reasoning](cloudfoundry/bosh-azure-storage-cli@749bf5a)
- 2023-12-19T09:10:09Z: [add timeout for PUT requests as well](cloudfoundry/bosh-azure-storage-cli@22372ec)
- 2023-12-21T12:49:26Z: [include further changes and comments](cloudfoundry/docs-bosh@95ad588)
- 2023-12-21T14:02:00Z: [include further changes and comments](cloudfoundry/docs-bosh@95ad588)
- 2024-02-09T16:16:21Z: [retry CPI calls in case of SSL_read errors as well](cloudfoundry/bosh-azure-cpi-release@f291148)
- 2024-02-13T12:49:12Z: [fixed typo](cloudfoundry/bosh-azure-cpi-release@d15f44a)
- 2024-02-15T12:27:32Z: [make the changes more readable](cloudfoundry/bosh-azure-cpi-release@f7dd849)
- 2024-02-16T12:54:10Z: [fix failing unit tests](cloudfoundry/bosh-azure-cpi-release@28f4ab3)
- 2024-04-17T14:08:21Z: [support swift tempURLs](cloudfoundry/bosh-s3cli@c6fc710)
- 2024-04-24T12:07:12Z: [Revert "fix failing unit tests"](cloudfoundry/bosh-azure-cpi-release@7a2e45f)
- 2024-04-24T12:07:31Z: [Revert "Remove retry logic"](cloudfoundry/bosh-azure-cpi-release@1a6dad7)
- 2024-04-24T12:39:47Z: [Revert "make the changes more readable"](cloudfoundry/bosh-azure-cpi-release@913ec21)
- 2024-04-24T12:40:07Z: [Revert "Ignore EOF Error during ssl_read"](cloudfoundry/bosh-azure-cpi-release@7e8817c)
- 2024-04-24T12:40:22Z: [Revert "fixed typo"](cloudfoundry/bosh-azure-cpi-release@b3f1c99)
- 2024-04-24T12:40:33Z: [Revert "retry CPI calls in case of SSL_read errors as well"](cloudfoundry/bosh-azure-cpi-release@0b1b2bc)
- 2024-05-02T13:43:27Z: [fix swift tempURLs and add unit/integration tests](cloudfoundry/bosh-s3cli@d3389dd)
- 2024-05-02T14:01:48Z: [fix swift tempURLs and add unit/integration tests](cloudfoundry/bosh-s3cli@d3389dd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants