Hi,
os_magnum offers the variable magnum_glance_images to upload images during installation, but that does not work:
TASK [os_magnum : Upload images to Glance] **************************************************************************************************************************************************************************
Thursday 21 June 2018 06:18:41 +0000 (0:00:03.813) 0:01:05.583 *********
skipping: [ctrjnjd005_magnum_container-104b953d] => (item={u'name': u'fedora-atomic-28', u'checksum': u'sha256:3a6c4a036a5574db6ed32d887c65d140836e0df80912e751406e7cc113de3e26', u'disk_format': u'raw', u'file': u'https://dl04.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-28-20180613.1/AtomicHost/x86_64/images/Fedora-AtomicHost-28-20180613.1.x86_64.raw.xz', u'image_format': u'bare', u'public': True, u'distro': u'fedora-atomic'})
skipping: [ctrjnjd004_magnum_container-278ecd21] => (item={u'name': u'fedora-atomic-28', u'checksum': u'sha256:3a6c4a036a5574db6ed32d887c65d140836e0df80912e751406e7cc113de3e26', u'disk_format': u'raw', u'file': u'https://dl04.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-28-20180613.1/AtomicHost/x86_64/images/Fedora-AtomicHost-28-20180613.1.x86_64.raw.xz', u'image_format': u'bare', u'public': True, u'distro': u'fedora-atomic'})
skipping: [ctrjnjd005_magnum_container-104b953d] => (item={u'name': u'coreos-1745.7.0', u'checksum': u'sha512:c376c94763de01501ae7c990a1d8a630ccf3f582bcedbc2fd1b6d253128255d6adff7209fca9efb36b7b0b398f89f24df350e342bc9f4b8a1d1a4ed019adf1c1', u'disk_format': u'qcow2', u'file': u'https://stable.release.core-os.net/amd64-usr/1745.7.0/coreos_production_openstack_image.img.bz2', u'image_format': u'bare', u'public': True, u'distro': u'coreos'})
skipping: [ctrjnjd004_magnum_container-278ecd21] => (item={u'name': u'coreos-1745.7.0', u'checksum': u'sha512:c376c94763de01501ae7c990a1d8a630ccf3f582bcedbc2fd1b6d253128255d6adff7209fca9efb36b7b0b398f89f24df350e342bc9f4b8a1d1a4ed019adf1c1', u'disk_format': u'qcow2', u'file': u'https://stable.release.core-os.net/amd64-usr/1745.7.0/coreos_production_openstack_image.img.bz2', u'image_format': u'bare', u'public': True, u'distro': u'coreos'})
failed: [ctrjnjd006_magnum_container-56f72d05] (item={u'name': u'fedora-atomic-28', u'checksum': u'sha256:3a6c4a036a5574db6ed32d887c65d140836e0df80912e751406e7cc113de3e26', u'disk_format': u'raw', u'file': u'https://dl04.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-28-20180613.1/AtomicHost/x86_64/images/Fedora-AtomicHost-28-20180613.1.x86_64.raw.xz', u'image_format': u'bare', u'public': True, u'distro': u'fedora-atomic'}) => {"failed": true, "item": {"checksum": "sha256:3a6c4a036a5574db6ed32d887c65d140836e0df80912e751406e7cc113de3e26", "disk_format": "raw", "distro": "fedora-atomic", "file": "https://dl04.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-28-20180613.1/AtomicHost/x86_64/images/Fedora-AtomicHost-28-20180613.1.x86_64.raw.xz", "image_format": "bare", "name": "fedora-atomic-28", "public": true}, "module_stderr": "mesg: ttyname failed: Inappropriate ioctl for device\nTraceback (most recent call last):\n File \"/tmp/ansible_euqzHH/ansible_module_os_image.py\", line 202, in <module>\n main()\n File \"/tmp/ansible_euqzHH/ansible_module_os_image.py\", line 153, in main\n cloud = shade.openstack_cloud(**module.params)\n File \"/usr/local/lib/python2.7/dist-packages/shade/__init__.py\", line 109, in openstack_cloud\n cloud_config = config.get_one_cloud(**kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/os_client_config/config.py\", line 1041, in get_one_cloud\n config = self._get_base_cloud_config(cloud)\n File \"/usr/local/lib/python2.7/dist-packages/os_client_config/config.py\", line 460, in _get_base_cloud_config\n name=name))\nos_client_config.exceptions.OpenStackConfigException: Cloud default was not found.\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
The task in os_magnum depends on the /etc/openstack/clouds.yaml file which isn't present when the task is executed.
I think the problem is the role order in the os-magnum-install playbook:
roles:
- role: "os_magnum"
- role: "openstack_openrc"
tags:
- openrc
The file /etc/openstack/clouds.yaml is generated by openstack_openrc, which is executed after magnum.
Queens has the same problem. master branch is missing openstack_openrc completely. I currently don't know how it is handled there.
fixed in master already: https:/ /review. openstack. org/#/c/ 543256/ /review. openstack. org/#/c/ 578147/
backport will be merging soon: https:/
expect it to be fixed in the next release :)