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

AKS cloud support for asyncdr #2737

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

AKS cloud support for asyncdr #2737

wants to merge 9 commits into from

Conversation

gejain
Copy link
Collaborator

@gejain gejain commented Aug 14, 2024

PTX-25618 - AKS cloud support for asyncdr

What this PR does / why we need it:
We can run asyncdr on cloud

Which issue(s) this PR fixes (optional)
Closes # https://purestorage.atlassian.net/browse/PTX-25618

Special notes for your reviewer:
Passed Job -
https://jenkins.pwx.dev.purestorage.com/job/Users/job/Geet/job/stork-systemtest-aks/8/

@gejain gejain requested a review from a team as a code owner August 14, 2024 11:49
@gejain gejain force-pushed the akstest branch 3 times, most recently from dd1b44b to cd02470 Compare August 20, 2024 15:18
pxStc.Spec.Metadata.Annotations[pxStcServiceKey][awsInternalLBKey] = awsInternalLBValue
pxStc.Spec.Metadata.Annotations[pxStcServiceKey][awsLBTypeKey] = awsLBTypeVal
pxStc.Spec.Metadata.Annotations[pxStcServiceKey][awsNLBTargetTypeKey] = awsNLBTargetTypeVal
pxStc.Spec.Metadata.Annotations[pxStcServiceKey][awsLBSubnetKey] = os.Getenv("LB_SUBNET_KEY")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we add a check to see if LB_SUBNET_KEY is empty?

pkg/asyncdr/asyncdr.go Outdated Show resolved Hide resolved
log.FailOnError(err, "failed to change PX service to LoadBalancer on source cluster")
}
if cloudName == "eks" {
pxService, err := core.Instance().GetService("portworx-service", "kube-system")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it "kube-system" or portworx namespace?

Copy link
Collaborator

@kphalgun-px kphalgun-px left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

pkg/asyncdr/asyncdr.go Outdated Show resolved Hide resolved
pkg/asyncdr/asyncdr.go Outdated Show resolved Hide resolved
@@ -95,6 +95,9 @@ RUN apk add --no-cache openssh sshpass
# Install dependancy for OCP 4.14 CLI
RUN apk --update add gcompat

#Install aws-cli
RUN apk add aws-cli && aws --version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this cli used for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its needed for EKS cluster switch from torepedo. We need to access source and destination.
Without this we get below error -

failed to switch to context. RefreshNodeRegistry Error

pkg/asyncdr/asyncdr.go Outdated Show resolved Hide resolved
log.Infof("Storage driver name: %v", storageDriverName)

if storageDriverName == storkdriver.PortworxDriverName {
stc, err := operator.Instance().ListStorageClusters(pxNamespace)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inst().V.GetDriver() will give you the STC

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are still using operator.Instance()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed this, just updated please check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

tests/basic/async_dr_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@lsrinivas-pure lsrinivas-pure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems your changes are missing. please check

log.Infof("Storage driver name: %v", storageDriverName)

if storageDriverName == storkdriver.PortworxDriverName {
stc, err := operator.Instance().ListStorageClusters(pxNamespace)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are still using operator.Instance()

@gejain gejain requested a review from lsrinivas-pure August 26, 2024 11:58
@gejain
Copy link
Collaborator Author

gejain commented Aug 26, 2024

seems your changes are missing. please check

I added changes, Thanks!

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

Successfully merging this pull request may close these issues.

3 participants