pivotal-cf / om

General command line utility for working with VMware Tanzu Operations Manager
Apache License 2.0
135 stars 104 forks source link

availability zones configuration could not be applied: request failed: unexpected response #645

Open ceesco53 opened 6 months ago

ceesco53 commented 6 months ago

Describe the bug

There is a bug within configure-director task and director.yml configuration file generated by om command om staged-director-config.

A section named az-configuration is present within director.yml to configure Availability Sets. When used to create a foundation configure-director task and director.yml config file works fine, but when used to modify director config after that it has been created failed with this error message.

selected worker: 12d4f59b-f9e5-4073-a638-cfd0516f8921
5.1.1
vars_files_args=("")
ops_files_args=("")
om --env env/foundations/cfzccb/config/env/env.yml configure-director --config
config/foundations/cfzccb/config/director/director.yml 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 2024/04/17 13:29:47 availability zones
configuration could not be applied: request failed: unexpected
response from
/api/v0/staged/director/availability_zones/0c6031d007569e97d22f:
HTTP/1.1 405 Method Not Allowed Transfer-Encoding: chunked
Cache-Control: private, no-store Connection: keep-alive
Content-Security-Policy: script-src 'self'; img-src 'self' data:;
style-src 'self' 'unsafe-inline'; object-src 'none'; Content-Type:
application/json; charset=utf-8 Date: Wed, 17 Apr 2024 13:29:47 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=63072000; includeSubDomains
X-Content-Type-Options: nosniff X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN X-Permitted-Cross-Domain-Policies: none
X-Request-Id: 97a90043-8d9f-41c9-a946-6619fab097b5 X-Runtime: 0.703415
46 {"errors":["This IaaS does not support modifying availability
zones"]} 0

Reproduction steps

1. 2. 3. ...

Expected behavior

The error is not supposed to happen since first we don't try to modify anything on Availability Sets and second because it's included into the configuration file generated by om command om staged-director-config.

Additional context

The workaround is to comment the specific az-configuration section present within director.yml

az-configuration:
name: Availability Sets
iaas_configuration_name: default
guid: 18ba5004b62a5b36835d
iaas_identifier: null