Skip to content

OCPBUGS-55052: Correct ASH driver inject env config #376

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

Phaow
Copy link
Contributor

@Phaow Phaow commented Apr 9, 2025

Correct ASH driver inject env config

...
2025-03-27T21:07:32.105160383Z W0327 21:07:32.105102       1 azure_disk_utils.go:236] InitializeCloudFromConfig failed with error: read /etc/azure/azurestackcloud.json: is a directory 
...

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 9, 2025
@openshift-ci-robot
Copy link

@Phaow: This pull request references Jira Issue OCPBUGS-54382, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Correct ASH driver inject env config

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from dobsonj and EmilienM April 9, 2025 06:31
@openshift-ci-robot
Copy link

@Phaow: This pull request references Jira Issue OCPBUGS-54382, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

Correct ASH driver inject env config

...
2025-03-27T21:07:32.105160383Z W0327 21:07:32.105102       1 azure_disk_utils.go:236] InitializeCloudFromConfig failed with error: read /etc/azure/azurestackcloud.json: is a directory 
...

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Phaow
Copy link
Contributor Author

Phaow commented Apr 9, 2025

Hi @gnufied @dobsonj , could you help review when you get a chance? Thank you!
/assign @gnufied @dobsonj

@Phaow
Copy link
Contributor Author

Phaow commented Apr 9, 2025

/retest-required

1 similar comment
@Phaow
Copy link
Contributor Author

Phaow commented Apr 10, 2025

/retest-required

Copy link
Contributor

openshift-ci bot commented Apr 10, 2025

@Phaow: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn facd409 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azurestack-csi facd409 link false /test e2e-azurestack-csi

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@gnufied
Copy link
Member

gnufied commented Apr 10, 2025

I am not sure if this is correct. See, the way initContainers in azure-disk csi controller pod, writes merged cloud-config to cloud-config emptydir. And that is what we are trying to mount in controller pod.

I think I changed the code when we merged https://github.com/openshift/azure-disk-csi-driver-operator/blob/release-4.15/pkg/azurestackhub/azure_stack_hub.go#L48-L76 code into csi-operator to be uniform between various deployments.

@Phaow
Copy link
Contributor Author

Phaow commented Apr 11, 2025

Hi @gnufied , thank you for looking into this!

See, the way initContainers in azure-disk csi controller pod, writes merged cloud-config to cloud-config emptydir. And that is what we are trying to mount in controller pod.

Yeah, the initContainers merged config is working as expected, that megre config should be only used for AZURE_CREDENTIAL_FILE, while the issue is AZURE_ENVIRONMENT_FILEPATH incorrect. It does not broken between 4.16-4.18 due to the cloud conf contains resourceManagerEndpoint: XXXX , so the azure auth does not goes to read the endpoints from our env var AZURE_ENVIRONMENT_FILEPATH -> https://github.com/openshift/azure-disk-csi-driver/blob/release-4.18/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/cloud.go#L130-L136 , while in 4.19 the new driver uses the new sdk and cloud-provider-azure dependency even if the resourceManagerEndpoint exist it always read the customer endpoints form AZURE_ENVIRONMENT_FILEPATH towards file if the env is set -> https://github.com/openshift/azure-disk-csi-driver/blob/master/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azclient/cloud.go#L133-L148C8. From my understanding, it sounds a bug in cloud-provider-azure previously that means if the cloud.conf contains resourceManagerEndpoint , then the AZURE_ENVIRONMENT_FILEPATH overwrite ep does not take effect, it seems not as expected.

@gnufied
Copy link
Member

gnufied commented Apr 15, 2025

hmm, it indeed seems like injector doesn't seem to be copying endpoints field and hence it must be copied from original config-map.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 15, 2025
Copy link
Contributor

openshift-ci bot commented Apr 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, Phaow

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 15, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 9815fef into openshift:main Apr 15, 2025
21 of 23 checks passed
@openshift-ci-robot
Copy link

@Phaow: Jira Issue OCPBUGS-54382: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-54382 has not been moved to the MODIFIED state.

In response to this:

Correct ASH driver inject env config

...
2025-03-27T21:07:32.105160383Z W0327 21:07:32.105102       1 azure_disk_utils.go:236] InitializeCloudFromConfig failed with error: read /etc/azure/azurestackcloud.json: is a directory 
...

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: azure-file-csi-driver-operator
This PR has been included in build ose-azure-file-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: csi-driver-manila-operator
This PR has been included in build csi-driver-manila-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-aws-efs-csi-driver-operator
This PR has been included in build ose-aws-efs-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-aws-ebs-csi-driver-operator
This PR has been included in build ose-aws-ebs-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-azure-disk-csi-driver-operator
This PR has been included in build ose-azure-disk-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-smb-csi-driver-operator
This PR has been included in build ose-smb-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-openstack-cinder-csi-driver-operator
This PR has been included in build ose-openstack-cinder-csi-driver-operator-container-v4.19.0-202504152221.p0.g9815fef.assembly.stream.el9.
All builds following this will include this PR.

@Phaow
Copy link
Contributor Author

Phaow commented Apr 16, 2025

/retitle OCPBUGS-55052: Correct ASH driver inject env config

@openshift-ci openshift-ci bot changed the title OCPBUGS-54382: Correct ASH driver inject env config OCPBUGS-55052: Correct ASH driver inject env config Apr 16, 2025
@openshift-ci-robot
Copy link

@Phaow: An error was encountered updating to the MODIFIED state for bug OCPBUGS-55052 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Error marking step #35534635 finished: root cause: Tried to update an entity that does not exist.: request failed. Please analyze the request body for more details. Status code: 400:

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

Correct ASH driver inject env config

...
2025-03-27T21:07:32.105160383Z W0327 21:07:32.105102       1 azure_disk_utils.go:236] InitializeCloudFromConfig failed with error: read /etc/azure/azurestackcloud.json: is a directory 
...

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Phaow
Copy link
Contributor Author

Phaow commented Apr 16, 2025

/jira refresh

@openshift-ci-robot
Copy link

@Phaow: Jira Issue OCPBUGS-55052: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-55052 has been moved to the MODIFIED state.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Phaow
Copy link
Contributor Author

Phaow commented Apr 16, 2025

/cherry-pick release-4.18

@openshift-cherrypick-robot

@Phaow: new pull request created: #381

In response to this:

/cherry-pick release-4.18

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants