-
Notifications
You must be signed in to change notification settings - Fork 77
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
get_credentails() doesn't check if unit is None #368
Labels
Comments
I also encountered this issue. (overcloud) ubuntu@rgildein-bastion:~/charm-openstack-integrator$ functest-configure --model openstack-overcloud -c zaza.openstack.charm_tests.vault.setup.auto_initialize
2022-06-13 11:21:30 [INFO] Running auto_initialize
CCB: unit=None
CCB: vault_unit=<Unit entity_id="vault/0">
CCB: cmd=ls -l ~ubuntu/vault_tests.yaml
CCB: resp={'Code': '2', 'Stderr': "ls: cannot access '/home/ubuntu/vault_tests.yaml': No such file or directory\n", 'Stdout': '', 'stderr': "ls: cannot access '/home/ubuntu/vault_tests.yaml': No such file or directory\n", 'stdout': ''}
CCB: resp.get('Code')=2
CCB: unit=None
CCB: unit=None
Traceback (most recent call last):
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/bin/functest-configure", line 8, in <module>
sys.exit(main())
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 96, in main
configure(model_name, funcs)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 58, in configure
run_configure_list(functions)
File "/usr/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/charm_lifecycle/configure.py", line 44, in run_configure_list
utils.get_class(func)()
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/openstack/charm_tests/vault/setup.py", line 162, in auto_initialize
basic_setup(cacert=cacert, unseal_and_authorize=True)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/openstack/charm_tests/vault/setup.py", line 56, in basic_setup
vault_svc = vault_utils.VaultFacade(cacert=cacert)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/openstack/charm_tests/vault/utils.py", line 65, in __init__
self.initialize()
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/openstack/charm_tests/vault/utils.py", line 75, in initialize
self.vault_creds = get_credentials()
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/openstack/charm_tests/vault/utils.py", line 317, in get_credentials
zaza.model.scp_from_unit(
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/__init__.py", line 108, in _wrapper
return run(_run_it())
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/__init__.py", line 93, in run
return task.result()
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/__init__.py", line 107, in _run_it
return await f(*args, **kwargs)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/model.py", line 397, in async_scp_from_unit
unit = get_unit_from_name(unit_name, model)
File "/home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages/zaza/model.py", line 172, in get_unit_from_name
app = unit_name.split('/')[0]
AttributeError: 'NoneType' object has no attribute 'split'
(overcloud) 1 ubuntu@rgildein-bastion:~/charm-openstack-integrator$ python --version
Python 3.8.10
(overcloud) ubuntu@rgildein-bastion:~/charm-openstack-integrator$ pip show zaza
Name: zaza
Version: 0.0.2.dev1
Summary: A Python3-only functional test framework for OpenStack Charms
Home-page: https://github.com/openstack-charmers/zaza
Author: OpenStack Charmers
Author-email: [email protected]
License: Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
Location: /home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages
Requires: PyYAML, jinja2, oslo.config, python-libmaas, tenacity, juju-wait, juju, async-generator, hvac, cryptography
Required-by: zaza.openstack
(overcloud) ubuntu@rgildein-bastion:~/charm-openstack-integrator$ pip show zaza-openstack
Name: zaza.openstack
Version: 0.0.1.dev1
Summary: Zaza tests for the OpenStack Charms project
Home-page: https://github.com/openstack-charmers/zaza-openstack-tests
Author: OpenStack Charmers
Author-email: [email protected]
License: Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
Location: /home/ubuntu/charm-openstack-integrator/.tox/overcloud/lib/python3.8/site-packages
Requires: tenacity, python-octaviaclient, python-neutronclient, gnocchiclient, python-designateclient, python-keystoneclient, dnspython, juju, cryptography, aodhclient, python-novaclient, python-ceilometerclient, boto3, python-heatclient, pyparsing, python-cinderclient, oslo.config, juju-wait, async-generator, jinja2, python-swiftclient, hvac, PyYAML, python-manilaclient, futurist, python-ironicclient, python-glanceclient, python-barbicanclient, lxml, pika, zaza
Required-by: |
ajkavanagh
added
bug
Something isn't working
good first issue
Good for newcomers
labels
Jun 13, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code with my own print debugs added:
For some reason ~ubuntu/vault_tests.yaml doesn't exist on the vault/0 unit, resulting in unit = None.
Debug output:
(func-smoke) ubuntu@coreycb-bastion:~/charmed-openstack-tester/tests/distro-regression$ functest-configure -m keystone_v3_smoke_focal:zaza-8a8caa275a3d
2020-07-16 19:28:57 [INFO] Running auto_initialize
CCB: unit=None
CCB: vault_unit=
CCB: cmd=ls -l ~ubuntu/vault_tests.yaml
CCB: unit_name=vault/0
CCB: resp={'Code': '2', 'Stderr': "ls: cannot access '/home/ubuntu/vault_tests.yaml': No such file or directory\n", 'Stdout': ''}
CCB: resp.get('Code')=2
CCB: unit=None
CCB: unit=None
CCB: unit_name=None
This ends up with a traceback that is hard to diagnose:
The text was updated successfully, but these errors were encountered: