juju scp fails when control-plane doesn't have a public ip

Bug #2007708 reported by Bas de Bruijne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charmed Kubernetes Testing
Fix Released
High
George Kraft

Bug Description

In testrun https://solutions.qa.canonical.com/v2/testruns/433b51ed-0b88-41e4-a908-9cdfbca65d88, which is ck8s 1.26 focal on openstack, test_audit_custom_policy fails with:

```
2023-02-17-01:38:45 root DEBUG =================================== FAILURES ===================================
2023-02-17-01:38:45 root DEBUG ___________________________ test_audit_custom_policy ___________________________
2023-02-17-01:38:45 root DEBUG Traceback (most recent call last):
2023-02-17-01:38:45 root DEBUG File "/home/ubuntu/k8s-validation/jobs/integration/validation.py", line 1260, in test_audit_custom_policy
2023-02-17-01:38:45 root DEBUG await scp_to(f.name, unit, path, tools.controller_name, tools.connection)
2023-02-17-01:38:45 root DEBUG File "/home/ubuntu/k8s-validation/jobs/integration/utils.py", line 196, in scp_to
2023-02-17-01:38:45 root DEBUG await asyncify(subprocess.check_call)(cmd.split())
2023-02-17-01:38:45 root DEBUG File "/home/ubuntu/k8s-validation/jobs/integration/utils.py", line 104, in wrapper
2023-02-17-01:38:45 root DEBUG return await loop.run_in_executor(None, partial)
2023-02-17-01:38:45 root DEBUG File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
2023-02-17-01:38:45 root DEBUG result = self.fn(*self.args, **self.kwargs)
2023-02-17-01:38:45 root DEBUG File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
2023-02-17-01:38:45 root DEBUG raise CalledProcessError(retcode, cmd)
2023-02-17-01:38:45 root DEBUG subprocess.CalledProcessError: Command '['juju', 'scp', '-m', 'foundation-openstack:admin/kubernetes-openstack', '/home/ubuntu/.local/share/juju/tmpyhg_am35/tmpq7mlaepb', 'kubernetes-control-plane/0:/tmp/validate_audit_custom_policy-namespace.yaml']' returned non-zero exit status 1.
```

The reason is that since recently, we are not giving k8c-cp a public IP when deployed on OpenStack, which means that `juju scp` does not work.

George Kraft (cynerva)
Changed in charmed-kubernetes-testing:
importance: Undecided → High
status: New → Triaged
Revision history for this message
George Kraft (cynerva) wrote :

PR: https://github.com/charmed-kubernetes/jenkins/pull/1213

This adds a --juju-ssh-proxy option to the validation suite that will proxy Juju SSH/SCP commands through the Juju controller. You will need to pass the new option in to the validation suite, but hopefully this does the trick.

Changed in charmed-kubernetes-testing:
assignee: nobody → George Kraft (cynerva)
status: Triaged → In Progress
George Kraft (cynerva)
Changed in charmed-kubernetes-testing:
status: In Progress → Fix Committed
milestone: none → 1.27
Revision history for this message
Canonical Solutions QA Bot (oil-ci-bot) wrote :

This bug is fixed with commit 4320902a to cpe-foundation on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cpe-foundation/commit/?id=4320902a

Changed in charmed-kubernetes-testing:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.