diff --git a/ansible/overcloud-bios-raid.yml b/ansible/overcloud-bios-raid.yml index a8b488cdf8f1fa13ab57cdf92a326b091b0f0508..82d344da155d27c5840d7d1bf641880064b0a2e7 100644 --- a/ansible/overcloud-bios-raid.yml +++ b/ansible/overcloud-bios-raid.yml @@ -77,7 +77,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node maintenance set {% raw %}{{ inventory_hostname }}{% endraw %} --reason BIOS-RAID"' + -a "baremetal node maintenance set {% raw %}{{ inventory_hostname }}{% endraw %} --reason BIOS-RAID"' delegate_to: "{{ seed_host }}" vars: # NOTE: Without this, the seed's ansible_host variable will not be @@ -108,7 +108,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node maintenance unset {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node maintenance unset {% raw %}{{ inventory_hostname }}{% endraw %}"' delegate_to: "{{ seed_host }}" vars: # NOTE: Without this, the seed's ansible_host variable will not be diff --git a/ansible/overcloud-deprovision.yml b/ansible/overcloud-deprovision.yml index f98846223397e4ddf782ffe472d849569184fa5e..e907508e029bb06c885c05d2ffe758ea29487341 100644 --- a/ansible/overcloud-deprovision.yml +++ b/ansible/overcloud-deprovision.yml @@ -45,7 +45,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result changed_when: False delegate_to: "{{ seed_host }}" @@ -79,7 +79,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node undeploy {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node undeploy {% raw %}{{ inventory_hostname }}{% endraw %}"' register: delete_result until: delete_result is successful or 'is locked by host' in delete_result.stdout retries: "{{ ironic_retries }}" @@ -105,7 +105,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result # Wait until the node is no longer in one of the deleting states. until: not show_result.stdout_lines[1:] | intersect(deleting_states) diff --git a/ansible/overcloud-hardware-inspect.yml b/ansible/overcloud-hardware-inspect.yml index 7cd0d8a0b6536fc97eef57e5a0f142ee7dacb8d8..e784f201a0769d0a3b5eeccb457704a602fec16c 100644 --- a/ansible/overcloud-hardware-inspect.yml +++ b/ansible/overcloud-hardware-inspect.yml @@ -39,7 +39,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result changed_when: False delegate_to: "{{ seed_host }}" @@ -73,7 +73,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node manage {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node manage {% raw %}{{ inventory_hostname }}{% endraw %}"' register: manage_result until: manage_result is successful or 'is locked by host' in manage_result.stdout retries: "{{ ironic_retries }}" @@ -98,7 +98,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node inspect {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node inspect {% raw %}{{ inventory_hostname }}{% endraw %}"' register: provide_result until: provide_result is successful or 'is locked by host' in provide_result.stdout retries: "{{ ironic_retries }}" @@ -122,7 +122,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result # Wait until the node is no longer in one of the inspecting states. until: not show_result.stdout_lines[1:] | intersect(inspecting_states) diff --git a/ansible/overcloud-introspection-data-save.yml b/ansible/overcloud-introspection-data-save.yml index 2cd80bc2e6731937344fcfd01233ec7035edaefd..da2b27c7f42be9ab9a0add14d569452929000ca1 100644 --- a/ansible/overcloud-introspection-data-save.yml +++ b/ansible/overcloud-introspection-data-save.yml @@ -21,7 +21,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m shell - -a "env OS_CLOUD=bifrost-inspector openstack baremetal introspection data save {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "env OS_CLOUD=bifrost baremetal introspection data save {% raw %}{{ inventory_hostname }}{% endraw %}"' register: save_result changed_when: False # Ignore errors, log a message later. diff --git a/ansible/overcloud-provision.yml b/ansible/overcloud-provision.yml index afe341ac099e2dd838bbbd5175b82597070349cc..7ad3647cb788eb7c28ecc14c013e042cdddd6eac 100644 --- a/ansible/overcloud-provision.yml +++ b/ansible/overcloud-provision.yml @@ -48,7 +48,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result changed_when: False delegate_to: "{{ seed_host }}" @@ -82,7 +82,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node manage {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node manage {% raw %}{{ inventory_hostname }}{% endraw %}"' register: manage_result until: manage_result is successful or 'is locked by host' in manage_result.stdout retries: "{{ ironic_retries }}" @@ -107,7 +107,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node provide {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node provide {% raw %}{{ inventory_hostname }}{% endraw %}"' register: provide_result until: provide_result is successful or 'is locked by host' in provide_result.stdout retries: "{{ ironic_retries }}" @@ -163,7 +163,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "openstack baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' + -a "baremetal node show {% raw %}{{ inventory_hostname }}{% endraw %} -f value -c provision_state"' register: show_result # Wait until the node is no longer in one of the deploying states. until: not show_result.stdout_lines[1:] | intersect(deploying_states) diff --git a/ansible/roles/dell-switch-bmp/handlers/main.yml b/ansible/roles/dell-switch-bmp/handlers/main.yml index d06ba609c224e50473a51eeee3a046703ea16cee..be549f9c4ba075746b7bd684a602f5ec487e6dc4 100644 --- a/ansible/roles/dell-switch-bmp/handlers/main.yml +++ b/ansible/roles/dell-switch-bmp/handlers/main.yml @@ -2,7 +2,7 @@ - name: Copy dnsmasq configuration command: > docker exec bifrost_deploy - bash -c '. /bifrost/env-vars && + bash -c 'export OS_CLOUD=bifrost && ansible -vvvv target -i /bifrost/playbooks/inventory/target -m copy -a "src=/etc/bifrost/dell-switch-bmp.conf dest=/etc/dnsmasq.d/dell-switch-bmp.conf" @@ -11,7 +11,7 @@ - name: Restart bifrost dnsmasq command: > docker exec bifrost_deploy - bash -c '. /bifrost/env-vars && + bash -c 'export OS_CLOUD=bifrost && ansible -vvvv target -i /bifrost/playbooks/inventory/target -m service -a "name=dnsmasq state=restarted" @@ -20,7 +20,7 @@ - name: Copy Dell switch BMP images command: > docker exec bifrost_deploy - bash -c '. /bifrost/env-vars && + bash -c 'export OS_CLOUD=bifrost && ansible -vvvv target -i /bifrost/playbooks/inventory/target -m copy -a "src=/etc/bifrost/{{ item.dest }} dest={{ dell_switch_bmp_httpboot_path }}/{{ item.dest }}" diff --git a/ansible/seed-ipa-build.yml b/ansible/seed-ipa-build.yml index c9c538a1c55a9827153f8d3c71251195a7948d44..ddc3ce50bbfb00b79bb0686236b21055219f70e3 100644 --- a/ansible/seed-ipa-build.yml +++ b/ansible/seed-ipa-build.yml @@ -45,7 +45,7 @@ - name: Copy Ironic Python Agent images into /httpboot command: > docker exec bifrost_deploy - bash -c '. /bifrost/env-vars && + bash -c 'export OS_CLOUD=bifrost && ansible -vvvv target -i /bifrost/playbooks/inventory/target -m copy -a "src=/etc/bifrost/{{ item }} dest=/httpboot/{{ item }}" diff --git a/doc/source/administration/seed.rst b/doc/source/administration/seed.rst index 84b66513679485450ee598d132a0e743b36c9ae0..8ac64ae4ae6e8017c4df897424e975bcb3100cf4 100644 --- a/doc/source/administration/seed.rst +++ b/doc/source/administration/seed.rst @@ -79,17 +79,12 @@ Docker volume. Accessing the Seed Services =========================== -The Ironic API can be accessed via the ``openstack`` command line interface:: +The Ironic and Ironic inspector APIs can be accessed via the ``baremetal`` +command line interface:: - (bifrost_deploy) $ source env-vars - (bifrost_deploy) $ openstack baremetal node list - -Ironic inspector API requires some environment variables to be set:: - - (bifrost_deploy) $ unset OS_CLOUD - (bifrost_deploy) $ export OS_URL=http://localhost:5050 - (bifrost_deploy) $ export OS_TOKEN=fake-token - (bifrost_deploy) $ openstack baremetal introspection list + (bifrost_deploy) $ export OS_CLOUD=bifrost + (bifrost_deploy) $ baremetal node list + (bifrost_deploy) $ baremetal introspection list Backup & Restore ================ diff --git a/doc/source/deployment.rst b/doc/source/deployment.rst index 3a352baa246e6eba1e43f1832956321ebd6ff408..d49f600c95b09a66fe8a6c92e1fd3ea3d22369b8 100644 --- a/doc/source/deployment.rst +++ b/doc/source/deployment.rst @@ -266,8 +266,8 @@ registered with the ironic service running in the seed host's the following on the seed:: $ docker exec -it bifrost_deploy bash - (bifrost_deploy) $ source env-vars - (bifrost_deploy) $ openstack baremetal node list + (bifrost_deploy) $ export OS_CLOUD=bifrost + (bifrost_deploy) $ baremetal node list In order to interact with these nodes using Kayobe, run the following command to add them to the Kayobe and Kolla-Ansible inventories:: @@ -340,8 +340,8 @@ Provisioning manually, e.g. from the seed:: $ docker exec -it bifrost_deploy bash - (bifrost_deploy) $ source env-vars - (bifrost_deploy) $ openstack baremetal node set ee77b4ca-8860-4003-a18f-b00d01295bda --name controller0 + (bifrost_deploy) $ export OS_CLOUD=bifrost + (bifrost_deploy) $ baremetal node set ee77b4ca-8860-4003-a18f-b00d01295bda --name controller0 Provisioning of the overcloud is performed by the ironic service running in the bifrost container on the seed. To provision the overcloud nodes:: diff --git a/doc/source/upgrading.rst b/doc/source/upgrading.rst index 1ee05c07f9ea07a7183abad8a7b285d56351feed..7a0b737b8f01d5273daa7a75f677ff00b2bd08d8 100644 --- a/doc/source/upgrading.rst +++ b/doc/source/upgrading.rst @@ -280,11 +280,10 @@ migrate: .. code-block:: console $ docker exec -it bifrost_deploy bash - (bifrost_deploy) $ export OS_URL=http://localhost:6385 - (bifrost_deploy) $ export OS_TOKEN=fake - (bifrost_deploy) $ openstack baremetal node maintenance set <node> - (bifrost_deploy) $ openstack baremetal node set <node> --driver ipmi - (bifrost_deploy) $ openstack baremetal node maintenance unset <node> + (bifrost_deploy) $ export OS_CLOUD=bifrost + (bifrost_deploy) $ baremetal node maintenance set <node> + (bifrost_deploy) $ baremetal node set <node> --driver ipmi + (bifrost_deploy) $ baremetal node maintenance unset <node> Upgrading Containerised Services -------------------------------- diff --git a/releasenotes/notes/bifrost-victoria-fixes-eed49b088afdac5b.yaml b/releasenotes/notes/bifrost-victoria-fixes-eed49b088afdac5b.yaml new file mode 100644 index 0000000000000000000000000000000000000000..85aef7609d1e2bd271001137b845ff6c5e642d05 --- /dev/null +++ b/releasenotes/notes/bifrost-victoria-fixes-eed49b088afdac5b.yaml @@ -0,0 +1,19 @@ +--- +upgrade: + - | + When interacting with Bifrost, sourcing the ``env-vars`` file is not + supported anymore. Set the ``OS_CLOUD`` environment variable to ``bifrost`` + instead or run ``. ~/openrc bifrost``. + - | + When interacting with Bifrost, it is recommended to use the ironic native + ``baremetal`` command instead of ``openstack baremetal``, as the + availability of OpenStackClient inside the Bifrost container is not + guaranteed. +deprecations: + - | + When interacting with Bifrost, the use of ``OS_CLOUD=bifrost-inspector`` is + deprecated and should be replaced by ``OS_CLOUD=bifrost``. +fixes: + - | + Fixes failure in the ``kayobe seed deployment image build`` command due to + changes in Bifrost.