Skip to content
Snippets Groups Projects
  1. May 20, 2020
  2. May 12, 2020
  3. Apr 28, 2020
    • Mark Goddard's avatar
      Fix ironic inspector rule creation idempotency · 2a00b4cc
      Mark Goddard authored
      Ironic inspector rules are registered both with the seed and (if using)
      overcloud ironic inspector services. These tasks often show up as
      changed even when no configuration changes have been made that would
      affect the rules.
      
      This is caused by inspector returning default values for fields that may
      be omitted in the requested rule. This change fixes the issue by
      including those defaults in the comparison.
      
      Change-Id: Ia24e328d4531201d76a65b6385e4463bb1f3c5c6
      Story: 2007399
      Task: 38997
      2a00b4cc
    • Isaac Prior's avatar
      Define default variables for Monasca config · 39308a45
      Isaac Prior authored
      Sets 'monasca_install_type: source' to remove need
      for kolla-ansible var boilerplate.
      
      Also use default Monasca parameters to configure
      Grafana post deploy.
      
      Change-Id: I2b6d62104c9c127cb8f6b4f4930dd695cd00da17
      Story: 2007597
      Task: 39587
      39308a45
  4. Apr 23, 2020
    • Mark Goddard's avatar
      Improve SSH known host error messages · 78909146
      Mark Goddard authored
      A common failure early on when using Kayobe is during discovery of SSH
      known hosts. This happens if a host does not have an IP address
      configured on the admin (SSH) network. The failure looks like this:
      
      PLAY [Ensure known hosts are configured]
      **********************************************************************
      TASK [ssh-known-host : Scan for SSH keys]
      **********************************************************************
      failed: [compute0 -> localhost] (item=) => {"ansible_loop_var": "item",
          "changed": false, "cmd": ["ssh-keyscan"], "delta": "0:00:00.013855",
          "end": "2020-04-17 10:51:01.857855", "item": "", "msg": "non-zero
              return code", "rc": 1, "start": "2020-04-17 10:51:01.844000",
          "stderr": "usage: ssh-keyscan [-46cDHv] [-f file] [-p port] [-T
              timeout] [-t type]\n\t\t   [host | addrlist namelist]",
          "stderr_lines": ["u sage: ssh-keyscan [-46cDHv] [-f file] [-p port]
              [-T timeout] [-t type]", "\t\t   [host | addrlist namelist]"],
              "stdout": "", "stdout_lines": []}
      
      This happens when ansible_host is an empty string, typically because the
      host has no IP address defined in for the admin network in
      network-allocation.yml. This is very confusing for a new user. We should
      provide a more informative message.
      
      It's not exactly clear how a user gets to this point, since the
      ip-allocation.yml playbook runs before ssh-known-host.yml, which should
      populate network-allocation.yml.
      
      This change detects this failure mode and provides a message with
      information about how to resolve it.
      
      Change-Id: I564b6e4509a30dec7c49a23bb2f75d490be775ed
      Story: 2007566
      Task: 39456
      78909146
  5. Apr 20, 2020
    • Mark Goddard's avatar
      Remove nameservers with any IP in overcloud resolv.conf workaround · dcd5159c
      Mark Goddard authored
      Kayobe has a workaround for CentOS cloud images which contain a bogus
      nameserver entry in /etc/resolv.conf. By setting
      overcloud_host_image_workaround_resolv_enabled to true, the entry would
      be removed. Previously we removed a specific IP address - 10.0.2.3 -
      that was present in the CentOS 7 images. However, it seems that CentOS 8
      images have a different IP - 192.168.122.1.
      
      This change fixes the issue and becomes resilient to future changes by
      matching any IP address. This should be fairly safe, since this
      workaround is opt-in.
      
      Change-Id: I9323a38cb2bb627ff56f5713900be00595ea8d4b
      Story: 2006574
      Task: 39484
      dcd5159c
    • Mark Goddard's avatar
      Fix passwords.yml generation with vault encryption on Python 3 · 8bed6235
      Mark Goddard authored
      Kayobe generates passwords.yml for Kolla Ansible, and can encrypt it
      using the vault password. Previously this was failing on Python 3 due to
      passing a string to file.write() which expects bytes.
      
      This change fixes the issue by encoding the password string passed to
      file.write().
      
      This allows us to run the ansible role tests under Python 3.
      
      Change-Id: I33813f79984a46f1967ef3aee455dcfbe7eb93da
      Story: 2006574
      Task: 39481
      8bed6235
  6. Apr 17, 2020
  7. Apr 16, 2020
    • Mark Goddard's avatar
      Run kolla-ansible bootstrap-servers as kolla user · 40e43e23
      Mark Goddard authored
      Previously, Kayobe used Kolla Ansible's bootstrap-servers command to
      create a user account and Python virtual environment for Kolla Ansible.
      In order to do this it used the Kayobe Ansible user and Python
      interpreter.
      
      This causes problems for Ansible fact caching, which needs separate
      caches for Kayobe and Kolla Ansible, since the different users and
      Python interpreters used result in different facts. Bootstrapping
      servers with the Kayobe user and interpreter resulted in the Kolla
      Ansible fact cache being populated with Kayobe's user and interpreter.
      
      This change disables user creation during Kolla Ansible's
      bootstrap-servers command, instead creating the user and virtual
      environment in Kayobe prior to running the command. This allows the
      bootstrap-servers command to be executed using the normal Kolla Ansible
      user and interpreter, which results in the correct facts being gathered.
      
      The downside here is some duplication of code and configuration, but a
      nice side effect is that we no longer need to dump configuration in the
      CLI for host configure in order to fetch the Ansible user and
      interpreter.
      
      Change-Id: I85670be7242bc436f73c689f027670b0938ba031
      Story: 2007492
      Task: 39444
      40e43e23
    • Mark Goddard's avatar
      Update inventory templates for Ussuri · e0932bd7
      Mark Goddard authored
      Sync with kolla-ansible multinode inventory.
      
      Change-Id: I30bd5286c4783fce544c41e726efc5f800d6f56a
      e0932bd7
  8. Apr 09, 2020
    • Mark Goddard's avatar
      CentOS 8: seed VM & bifrost · 51b84b60
      Mark Goddard authored
      * Change default seed VM image to CentOS 8
      * Change default bifrost deploy image to CentOS 8
      * Workaround DIB bug
        https://bugs.launchpad.net/diskimage-builder/+bug/1866847 by setting
        DIB_DISABLE_KERNEL_CLEANUP to 1
      * Install iptables on seed for SNAT - missing on CentOS 8
      * Fix provider network MTU lookup for empty string
      * Bump stackhpc.libvirt-host to 1.7.0 for CentOS 8 support
      * Bump stackhpc.libvirt-vm to 1.13.0 for CentOS 8 support
      * Bump jriguera.configdrive for Python 3 support
      
      Change-Id: Ie0edf6a924a914395c6502e2d5cf1139bce14a48
      Story: 2006574
      Task: 39000
      51b84b60
    • Pierre Riteau's avatar
      Filter out switch port descriptions on Ruckus switches · 010681d7
      Pierre Riteau authored
      Some Ruckus switches, e.g. the Ruckus ICX 7150, advertise switch
      interface names as switch port descriptions. Unlike Dell switches, there
      is no space character between port type and port number. For example:
      GigabitEthernet1/1/9.
      
      Update regular expression to match both styles.
      
      Change-Id: I359b07abadc8665ff0a8c3407ca0fc5effc504cf
      Story: 2007532
      Task: 39343
      010681d7
  9. Apr 08, 2020
    • Pierre Riteau's avatar
      Fix seed VM provisioning on a remote seed hypervisor · cc3d27e2
      Pierre Riteau authored
      The seed VM will fail to provision if the Ansible control host and the
      seed hypervisor are not the same hosts.
      
      This is because Kayobe creates the seed-vm-user-data file on the
      seed-hypervisor host. It then invokes the jriguera.configdrive role
      which uses a copy task without remote_src, which fails to find the
      source file locally on the Ansible control host.
      
      Instead we create a local temporary file for seed VM user data.
      
      Change-Id: Iabbe4c624b9ad02bb82c323070f99c16e5822966
      Story: 2007530
      Task: 39338
      cc3d27e2
    • Mark Goddard's avatar
      Avoid unconditional fact gathering · e924c99c
      Mark Goddard authored
      One way to improve the performance of Ansible is through fact caching.
      Rather than gather facts in every play, we can configure Ansible to
      cache them in a persistent store. An example Ansible configuration for
      doing this is as follows:
      
      [defaults]
      gathering = smart
      fact_caching = jsonfile
      fact_caching_connection = ./facts
      fact_caching_timeout = 86400
      
      While this mostly just works, there are a few places where we
      unconditionally gather facts using the setup module. This change
      modifies these to only gather facts when necessary.
      
      We no longer execute the MichaelRigart.interfaces role using become:
      true, since it may gather facts and we do not want it to do so as root.
      The role uses become where necessary.
      
      Change-Id: I9984a187fc6c0496ada489bb8eef36e44d695aac
      Story: 2007492
      Task: 39216
      e924c99c
  10. Apr 06, 2020
    • Mark Goddard's avatar
      Add kolla_enable_openstack_core variable · 9475e05e
      Mark Goddard authored
      Adds a new variable, 'kolla_enable_openstack_core', which can be set a
      default value for whether the default OpenStack services are enabled.
      This includes Glance, Heat, Horizon, Ironic, Keystone, Neutron and Nova.
      It is 'true' by default.
      
      Change-Id: I7768d3a92272d4353522dbf1a96f124225f4d73d
      Story: 2007524
      Task: 39315
      9475e05e
  11. Apr 03, 2020
    • Pierre Riteau's avatar
      Prevent openrc files from using wrong OS_CACERT value · ce212cc2
      Pierre Riteau authored
      Kolla Ansible sets kolla_{external,internal}_fqdn_cacert variables with
      default values compatible with the use of `kolla-ansible certificates`.
      
      However, when these variables are left unset in Kayobe, which is
      generally the case when using trusted certificates, we end up with
      openrc files setting OS_CACERT to a file that does not exist:
      
          ${KOLLA_CONFIG_PATH}/certificates/haproxy-ca.crt
      
      Instead we allow null cacert variables to be passed to kolla-ansible,
      which results in openrc files without the bogus OS_CACERT entry.
      
      Change-Id: Ifa615888b6d8d54c9e6314fd90f3fc4872fc6e5a
      Story: 2007516
      Task: 39299
      ce212cc2
  12. Apr 02, 2020
    • Will Szumski's avatar
      Switch to stackhpc fork of resmo.ntp · 31ad22ab
      Will Szumski authored
      There is no activity on the resmo fork of the role and it seems
      impossible to get any patches merged.
      
      Change-Id: I1f09f7c11767226e89b34687dab1553e87be76ba
      Story: 2005272
      Task: 39197
      31ad22ab
  13. Mar 31, 2020
    • Mark Goddard's avatar
      Don't use become for Kolla Ansible · 939e298c
      Mark Goddard authored
      Using become for all Kolla Ansible tasks is not ideal from a security
      perspective. It is also incompatible with fact caching, since it causes
      facts to be gathered and cached as root, which changes some facts.
      
      This change modifies the default value of kolla_ansible_become to false.
      
      Change-Id: I9ee5c55e59276f70c92e9c698c01123dcf8919a1
      Story: 2007492
      Task: 39217
      939e298c
  14. Mar 30, 2020
    • Doug Szumski's avatar
      Fix loading of Monasca Grafana dashboards · cdc1d5ad
      Doug Szumski authored
      This is a minimal fix to support loading dashboards into the Monasca
      Grafana fork. It firstly aligns the default Monasca Grafana control
      plane organisation and Monasca Grafana local admin username with Kolla
      Ansible to make the feature easier to use. Secondly, it extracts the
      associated OpenStack project name from this variable by stripping off
      the OpenStack domain.
      
      Longer term we may wish to move the dashboard loading functionality into
      Kolla Ansible, now that it supports deploying Monasca.
      
      Affects Rocky onwards.
      
      Change-Id: I77c94edf654565a12ce8be681e3c9b16caa55c86
      Story: 2007477
      Task: 39186
      cdc1d5ad
  15. Mar 26, 2020
  16. Mar 19, 2020
    • Mark Goddard's avatar
      CentOS 8: Support DNF · dc32b52f
      Mark Goddard authored
      Adds support for configuration of DNF repo mirrors for CentOS and EPEL
      repositories, as well as custom repositories.
      
      Adds support for DNF automatic, which is a replacement for yum-cron.
      
      Configuration is backwards compatible, falling back to the equivalent
      yum variables when DNF variables have not been overridden.
      
      Change-Id: I8bef5e9c8e1c77c25d6077ff690da8f2cde6a643
      Story: 2006574
      Task: 38922
      dc32b52f
  17. Mar 18, 2020
    • Radosław Piliszek's avatar
      Remove ceph block device support · e7d7daa5
      Radosław Piliszek authored
      It leaves certain ceph mentions in globals.yml.j2 as it needs
      syncing with kolla-ansible contents anyways
      (these are all comments).
      
      Change-Id: I05e9c6223583e9bb5dc0020edc0b56990275093c
      Story: 2007295
      Task: 38766
      e7d7daa5
  18. Mar 11, 2020
    • Mark Goddard's avatar
      CentOS 8: Add seed and overcloud CI jobs, drop CentOS 7 jobs · b0359e37
      Mark Goddard authored
      CentOS 8 removes interfaces from their bridge during ifdown, and removes
      the bridge if there are no interfaces left. When Kayobe bounces veth
      links plugged into the bridge, it causes the bridge which has the IP we
      are using for SSH to be removed. Use a dummy interface in CI to avoid
      this problem.
      
      Kolla-ansible has dropped all CentOS 7 jobs on master now, and prechecks
      only allow CentOS 7 hosts. Drop all CentOS 7 jobs. We will have to run
      without upgrade jobs in place until Train supports CentOS 8.
      
      Depends-On: https://review.opendev.org/695881
      
      Change-Id: I7c1a885b36445e33d4db1b1c8533db28a644b4a1
      Story: 2006574
      Task: 38870
      b0359e37
  19. Mar 05, 2020
    • Mark Goddard's avatar
      Blacklist Ansible 2.8.9 · 5507bba7
      Mark Goddard authored
      Backport: train
      
      OpenStack Ansible modules were broken in Ansible 2.8.9. This affects
      kolla-toolbox, and kayobe's ansible install for tasks that interact with
      APIs. See https://github.com/ansible/ansible/issues/68042 and
      https://bugs.launchpad.net/kolla/+bug/1866181.
      
      This change blacklists ansible 2.8.9 for Kayobe and Kolla Ansible. A
      separate change will be made to kolla to blacklist ansible 2.8.9 from
      the kolla-toolbox image.
      
      Depends-On: https://review.opendev.org/711485
      
      Change-Id: I535ab240b7ab8f3ab104b49170e4a9ee01fc482b
      Story: 2007383
      Task: 38959
      5507bba7
    • Mark Goddard's avatar
      CentOS 8: Disable ntpd, enable chrony container · 71d36cbe
      Mark Goddard authored
      CentOS 8 does not provide an ntp package. Instead fall back to using the
      chrony container provided by Kolla Ansible by default.
      
      Depends-On: https://review.opendev.org/711511
      
      Change-Id: If5230854d7565c8b3c91a46da4795c63edf095e4
      Story: 2006574
      Task: 38866
      71d36cbe
    • Mark Goddard's avatar
      Skip resmo.ntp role if ntp_service_enabled is false · 35e50bb6
      Mark Goddard authored
      We enable ntpd by default, and provide a variable to disable it -
      ntp_service_enabled. It is also automatically disabled if the user
      enables the chrony container (kolla_enable_chrony).
      
      However, setting ntp_service_enabled to false will cause the host
      configure commands to fail due to a bug in the resmo.ntp role. This is
      because it tries to configure the ntpd service in systemd, but it will
      not exist so the task fails.
      
      This change fixes the issue by skipping the resmo.ntp role if the NTP
      service is disabled.
      
      Change-Id: I640873c11ceae5008030dc03984c089a410a0cee
      Story: 2007384
      Task: 38968
      35e50bb6
    • Pierre Riteau's avatar
      Remove seed_hypervisor_libvirt_pool_capacity variable · 7b7d39eb
      Pierre Riteau authored
      This is ignored by Libvirt, so there is no need to pass it to the
      libvirt-host role.
      
      Note: omitting the capacity argument requires libvirt-host 1.3.1 or
      later.
      
      Change-Id: Id94e7b514ed36c8e042e56e8f1891d98f8371e5d
      Story: 2007381
      Task: 38957
      7b7d39eb
  20. Mar 03, 2020
  21. Feb 28, 2020
  22. Feb 27, 2020
  23. Feb 26, 2020
  24. Feb 25, 2020
    • Mark Goddard's avatar
      CentOS 8: Use ansible_playbook_python for localhost dependencies · a9113517
      Mark Goddard authored
      Currently we install python dependencies on the Ansible control host
      each time the ip-allocation and console-allocation roles are executed.
      This is inefficient, particularly in the case of the ip-allocation role
      which is run serially for all hosts. It is also unnecessary since we
      have these packages available in the Python environment used to execute
      kayobe.
      
      The kolla-ansible role also has an implicit dependency on PyYAML for
      managing kolla passwords.
      
      This change uses ansible_playbook_python as the Python interpreter for
      the necessary tasks in these roles to avoid installing dependencies on
      the system on CentOS 8 and Ubuntu. For CentOS 7 we still need to use the
      platform Python, due to needing SELinux bindings.
      
      Change-Id: Ic6a1c69a34241f4fbe617a0b12aec9b1528ba352
      Story: 2006574
      Task: 38825
      a9113517
  25. Feb 21, 2020
    • Doug Szumski's avatar
      Fix Kayobe overcloud introspection data save · 167e2ff3
      Doug Szumski authored
      Kayobe overcloud introspection data save fails because the dynamic
      inventory script siliently breaks causing Ansible to parse it as a
      static inventory file. The failure occurs due to OS_TOKEN being set.
      This change works around setting OS_TOKEN before running the dynamic
      inventory script by setting OS_CLOUD before querying inspector.
      
      Confirmed on Stein and Train, and verified in both environments.
      
      Story: 2007326
      Task: 38846
      Change-Id: I57fbf91ae3440d3e4e6a64cd7d05151e299c9322
      167e2ff3
  26. Feb 20, 2020
    • Mark Goddard's avatar
      Remove activate-virtualenv and deactivate-virtualenv roles · 2e842ab3
      Mark Goddard authored
      These roles are no longer necessary now that Ansible supports setting
      ansible_python_interpreter via a task- or role-scoped variable.
      
      Change-Id: I4121d01dc83ac028350d4d98d3e1158e15fdfd63
      Story: 2006574
      Task: 38824
      2e842ab3
    • Mark Goddard's avatar
      Switch from shade to openstacksdk · 2de3a2c5
      Mark Goddard authored
      Upstream Ansible OpenStack modules now use openstacksdk rather than shade.
      Switch local Ansible modules to follow suit. Also switch to use the
      stackhpc.os_openstacksdk role from stackhpc.os-shade.
      
      The stackhpc.os-shade role is removed during 'kayobe control host upgrade'.
      
      Change-Id: Id3894c3c36ef99f00ed463de6a3457e11733d6b7
      Story: 2007294
      Task: 38759
      2de3a2c5
  27. Feb 19, 2020
  28. Feb 14, 2020
    • Pierre Riteau's avatar
      Revert "Use OpenStack Train release" · c9474bf9
      Pierre Riteau authored
      This reverts commit a93b85ba.
      
      The local Python executable for Kolla Ansible is changed to Python 3
      because Kolla Ansible master no longer supports Python 2.
      
      Change-Id: I768ce8db9cec1c70d94f271997bbcc64d370403e
      c9474bf9
    • Mark Goddard's avatar
      Make local kolla-ansible Python executable configurable · 6b47717c
      Mark Goddard authored
      The default is still Python 2. This is a necessary prerequisite for using
      the master branch of kolla-ansible, which requires Python 3.
      
      Change-Id: Ida5b60b723c8208bb7305c3d669eafdab6dbbe01
      Story: 2004959
      Task: 38767
      6b47717c
  29. Jan 03, 2020
    • Mark Goddard's avatar
      Fix overcloud provisioning due to Bifrost IPA rename · fa7d29b4
      Mark Goddard authored
      Kolla recently upgraded bifrost from 7.0.0 to 7.1.0 on the stable/train
      branch. This switched to IPA builder to build the IPA image, and
      introduced a rename of the IPA kernel file from ipa.vmlinuz to
      ipa.kernel, which breaks overcloud provisioning. The iPXE kernel
      download fails with a 404, since Kayobe introspection rules use
      ipa.vmlinuz for the driver_info.deploy_kernel URL.
      
      This change works around the issue by setting two Bifrost variables,
      ipa_kernel and ipa_kernel_url, to reference the old kernel filename of
      ipa.vmlinuz. This works both in the case where the image is downloaded
      from a URL (ipa_kernel sets the destination file name), and where it is
      built via 'kayobe seed deployment image build' (kayobe uses the legacy
      ironic-agent DIB element rather than IPA builder, which creates a
      hardlink to ipa.vmlinuz).
      
      We chose the above approach rather than switching to IPA builder due to
      it being a less risky change at a time close to release. A future
      release of Kayobe should switch to IPA builder, but this will be a
      larger effort.
      
      [1] https://review.opendev.org/#/c/692200/1/playbooks/roles/bifrost-ironic-install/defaults/main.yml
      
      Change-Id: I7f75c25602fd7ae4bfeb6abbdd3b42d8ee465abf
      Story: 2007068
      Task: 37951
      fa7d29b4
Loading