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

Cannot configure director when vm-extensions are in-use #584

Open
diego-fidalgo opened this issue May 11, 2022 · 1 comment
Open

Cannot configure director when vm-extensions are in-use #584

diego-fidalgo opened this issue May 11, 2022 · 1 comment

Comments

@diego-fidalgo
Copy link

diego-fidalgo commented May 11, 2022

Steps to reproduce

  1. Create a vm-extension by using om create-vm-extension.
  2. Configure that vm-extension in the tiles resources configuration.
  3. Apply the changes in om.
  4. Run om configure-director

Expected

om configure-director should work well as we are not changing anything:

started setting iaas configurations for bosh tile
finished setting iaas configurations for bosh tile
started configuring director options for bosh tile
finished configuring director options for bosh tile
started configuring availability zone options for bosh tile
successfully fetched AZs, continuing
finished configuring availability zone options for bosh tile
started configuring network options for bosh tile
finished configuring network options for bosh tile
started configuring network assignment options for bosh tile
finished configuring network assignment options for bosh tile
started configuring vm extensions
applying vmextensions configuration for the following:
finished configuring vm extensions
started configuring resource options for bosh tile
finished configuring resource options for bosh tile

Actual

om configure-director fails because it cannot delete a vm-extension that is being used:

started setting iaas configurations for bosh tile
finished setting iaas configurations for bosh tile
started configuring director options for bosh tile
finished configuring director options for bosh tile
started configuring availability zone options for bosh tile
successfully fetched AZs, continuing
finished configuring availability zone options for bosh tile
started configuring network options for bosh tile
finished configuring network options for bosh tile
started configuring network assignment options for bosh tile
unable to set network assignment for director as it has already been deployed
finished configuring network assignment options for bosh tile
started configuring vm extensions
applying vmextensions configuration for the following:
deleting vm extension cloud-controller-iam

2022/05/11 10:10:55 request failed: unexpected response from /api/v0/staged/vm_extensions/cloud-controller-iam:
HTTP/1.1 422 Unprocessable Entity
Transfer-Encoding: chunked
Cache-Control: no-cache, no-store
Connection: keep-alive
Content-Type: application/json; charset=utf-8
Date: Wed, 11 May 2022 10:10:54 GMT
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Referrer-Policy: strict-origin-when-cross-origin
Server: Ops Manager
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: 9783ed63-fafb-43c7-8625-662e86c70905
X-Runtime: 0.169166
X-Xss-Protection: 1; mode=block
151
{"errors":{"vm_extension":["cf-1c43a429818fdf4e22ca is using \"cloud-controller-iam\" in vm_extensions","cf-1c43a429818fdf4e22ca is using \"cloud-controller-iam\" in vm_extensions","cf-1c43a429818fdf4e22ca is using \"cloud-controller-iam\" in vm_extensions","cf-1c43a429818fdf4e22ca is using \"cloud-controller-iam\" in vm_extensions"]}}
0

Notes
After taking a look into the code, we think that the problematic part is here:

extensionsToDelete, err := c.addNewExtensions(currentExtensions, config.VMExtensions)
If a tile depends on a vm-extension, it cannot be deleted, thus configure-director commands fails.

@cf-gitbot
Copy link
Member

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants