Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

v0.22.0 gardenctl unable to operate against aws/gcp/azure cloud providers #389

Closed
neo-liang-sap opened this issue Oct 16, 2020 · 7 comments · Fixed by #390 or #391
Closed

v0.22.0 gardenctl unable to operate against aws/gcp/azure cloud providers #389

neo-liang-sap opened this issue Oct 16, 2020 · 7 comments · Fixed by #390 or #391

Comments

@neo-liang-sap
Copy link
Contributor

Describe the bug

This bug is introduced in #368
Now the issue is (same for aws/gcp/azure):

  1. when run some cloud provider command e.g. gardenctl aws ec2 describe-instances, the actually command running is gardenctl aws aws ec2 describe-instances, so the aws command will exit with error code.
    The problem code is d5677ca#diff-35cfdbb008094fbcbebfc8909edc59f44d1290e38a3bdd9da5c08b5fadff1de7R90

the args already contains cloud provider command e.g. aws and in next line, aws is append again

  1. even the 1) is fixed, gardenctl aws ec2 describe-instances will display nothing.

the problem code is d5677ca#diff-35cfdbb008094fbcbebfc8909edc59f44d1290e38a3bdd9da5c08b5fadff1de7R94

previous code will return command output but now it displays nothing

err := ExecCmd(nil, arguments, false, "AWS_ACCESS_KEY_ID="+string(accessKeyID[:]), "AWS_SECRET_ACCESS_KEY="+string(secretAccessKey[:]), "AWS_DEFAULT_REGION="+region, "AWS_DEFAULT_OUTPUT=text")

Above 1) and 2) issues applies for gcp/aws/azure

To Reproduce
Steps to reproduce the behavior:

  1. target a gcp/aws/azure
  2. gardenctl aws/gcp/azure
  3. nothing is displayed

Expected behavior
error should not occur

Screenshots

Gardenctl Version (please complete the following information):
v0.22.0
Additional context
Add any other context about the problem here.

@neo-liang-sap
Copy link
Contributor Author

Per discussion with @dansible i'm providing an ugly hotfix #390

@neo-liang-sap
Copy link
Contributor Author

/reopen
the fix i provided is a temp/ugly/quick fix, if anyone has better refactor idea feel free re-design the fix

@tedteng
Copy link
Contributor

tedteng commented Oct 16, 2020

PR for the subcommand #391. maybe we can revoke #390

@tedteng
Copy link
Contributor

tedteng commented Oct 16, 2020

Its all good for

AWS:

gg aws ec2 describe-instances -- --instance-id i-0651db1613a04e70a
RESERVATIONS	802691470131	r-07391c0be8c7bb9f0
INSTANCES	0	x86_64		False	True	xen	ami-01fffc8f3a3797140	i-0651db1613a04e70a	t2.micro	dirk-test	2020-09-24T15:22:56+00:00	ip-172-31-15-39.eu-central-1.compute.internal	172.31.15.39	ec2-18-159-254-72.eu-central-1.compute.amazonaws.com	18.159.254.72	/dev/xvda	ebsTrue		subnet-7bb43136	hvm	vpc-0ec41265
BLOCKDEVICEMAPPINGS	/dev/xvda
EBS	2020-09-24T15:22:57+00:00	True	attached	vol-0df2175c60996d337
CAPACITYRESERVATIONSPECIFICATION	open
CPUOPTIONS	1	1
HIBERNATIONOPTIONS	False
METADATAOPTIONS	enabled	1	optional	applied
MONITORING	disabled
NETWORKINTERFACES		interface	0a:30:68:13:9a:52	eni-0e2117f1d3aef2ed2	802691470131	ip-172-31-15-39.eu-central-1.compute.internal	172.31.15.39	True	in-use	subnet-7bb43136	vpc-0ec41265
ASSOCIATION	amazon	ec2-18-159-254-72.eu-central-1.compute.amazonaws.com	18.159.254.72
ATTACHMENT	2020-09-24T15:22:56+00:00	eni-attach-0ac344941bcf36b0d	True	0	attached
GROUPS	sg-0ce38b4da3483987a	launch-wizard-25
PRIVATEIPADDRESSES	True	ip-172-31-15-39.eu-central-1.compute.internal	172.31.15.39
ASSOCIATION	amazon	ec2-18-159-254-72.eu-central-1.compute.amazonaws.com	18.159.254.72
PLACEMENT	eu-central-1c		default
SECURITYGROUPS	sg-0ce38b4da3483987a	launch-wizard-25
STATE	16	running
TAGS	Name	d040949-tmp-gardenlinux177

some network issue gcp/azure testing onging

@neo-liang-sap
Copy link
Contributor Author

neo-liang-sap commented Oct 16, 2020

#390 is already merged and released in v0.23.0, if you would like to revert #390 please include the revert code in this PR
BTW according to @dansible gardenctl will be in code freeze before we implement full E2E test
Thanks
-Neo

@tedteng
Copy link
Contributor

tedteng commented Oct 19, 2020

The hotfix #390 break AWS/GCP/AZ SSH feature #395

PR to fix SSH and subcommand aws/gcp/az #391 -onging

@dansible

@tedteng
Copy link
Contributor

tedteng commented Oct 19, 2020

for short summary, PR #391 will fix all the issues except the new issue I found #396 (v21)

I haven't found the suitable case to achieve the automation test for aws.go gcp.go az.go yet. That why the PR with [WIP], but The PR ready merge to fix most of the issues. that depend on decided from @gardenctl-maintainers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants