Skip to content
Snippets Groups Projects
  1. May 22, 2020
    • Mark Goddard's avatar
      Improve error reporting in password utilities · 620b808c
      Mark Goddard authored
      The kolla-genpwd and kolla-mergepwd commands can be used to manipulate
      the kolla passwords.yml file. The format is a YAML encoded dict of
      password variable names to their values. If the format is not a dict,
      the error messages are unhelpful.  In particular, this can happen if the
      file is encrypted e.g. via Ansible Vault.
      
      For kolla-genpwd:
      
          AttributeError: 'NoneType' object has no attribute 'items'
      
      For kolla-mergepwd:
      
          AttributeError: 'NoneType' object has no attribute 'update'
      
      This change adds a more friendly message.
      
      Change-Id: I27f0835b904e05006ae401adf383090322e1b891
      Closes-Bug: #1880220
      620b808c
  2. May 17, 2020
    • gugug's avatar
      Enable W503 for flake8 check · 22f7aecb
      gugug authored
      W503 and W504 are incompatible and we need to choose one of them.
      Existing codes follows W503, so we disable W504.
      
      Change-Id: Ic745e956dd332eb0fa49b93c1e6acb12f8a7f26c
      22f7aecb
  3. Apr 14, 2020
    • Mark Goddard's avatar
      Fix service_mapped_to_host filter for common services · 8cc58e36
      Mark Goddard authored
      In Ibecac60d1417269bbe25a280996ca9de6e6d018f, the services in the common
      role were marked as being mapped to the 'all' group, since the
      'service_mapped_to_host' filter expects every service definition to have
      either a 'group' or 'host_in_groups' field. While this allows the filter
      to pass the common services without error, it will not actually show
      them as being mapped to any hosts. This is because the filter uses the
      'group_names' variable, which contains all of the groups that a host
      belongs to, except the default 'all' group.
      
      This change fixes the issue by returning True from
      service_mapped_to_host when the service's group is 'all'.
      
      Change-Id: I39c8416f5d30a535c1743f9c43434b7d2a382196
      Related-Bug: #1868596
      8cc58e36
  4. Apr 04, 2020
    • Andreas Jaeger's avatar
      Update hacking for Python3 · 45448976
      Andreas Jaeger authored
      The repo is Python 3 now, so update hacking to version 3.0 which
      supports Python 3.
      
      Fix problems found by updated hacking version.
      
      Remove hacking and friends from lower-constraints, they are not needed
      during installation.
      
      Change-Id: I7ef5ac8a89e94f5da97780198619b6facc86ecfe
      45448976
  5. Apr 02, 2020
    • Radosław Piliszek's avatar
      Use unittest.mock instead of PyPI mock · 5648ad6e
      Radosław Piliszek authored
      Now that py2 is gone, oslotest dropped dependency on mock and will
      soon affect Ussuri CI [1], let's use unittest.mock built in py3.
      
      This also fixes py38 jobs and proactively prevents py36 and py37
      failing due to [1]. This is because we never included mock in
      test-requirements (but in lower-constraints where it does not
      really belong at all) and instead relied on oslotest to bring
      it in.
      
      [1] https://review.opendev.org/716322
      
      Change-Id: I30e82e2d87418272a71c7ee089a8acdaf8872158
      5648ad6e
  6. Mar 20, 2020
    • Mark Goddard's avatar
      Fix service_mapped_to_host filter · 35966c91
      Mark Goddard authored
      The service_mapped_to_host filter is used to check if a service is
      mapped to a host, based on the group for the service or its
      host_in_groups attribute if one exists. We check if the service's group
      is in the 'groups' list. However, to get the list of groups to which a
      host belongs, we should use the 'group_names' list.
      
      This filter is currently only used in neutron IPv6 module loading, so
      the effects are minimal.
      
      Change-Id: I37409ca8d273b0426df0a648db222dc5432e738a
      Closes-Bug: #1868285
      35966c91
  7. Feb 11, 2020
  8. Feb 08, 2020
  9. Oct 18, 2019
    • Doug Szumski's avatar
      Add unit tests for Nova Cells filters · 8e068099
      Doug Szumski authored
      This moves the Nova Cells filters alongside the service filters
      for ease of testing.
      
      Partially Implements: blueprint support-nova-cells
      Change-Id: I32d35c065812c6b46c64bacdf283a0bdad0f8a0f
      8e068099
  10. Oct 16, 2019
    • Radosław Piliszek's avatar
      Implement IPv6 support in the control plane · bc053c09
      Radosław Piliszek authored
      Introduce kolla_address filter.
      Introduce put_address_in_context filter.
      
      Add AF config to vars.
      
      Address contexts:
      - raw (default): <ADDR>
      - memcache: inet6:[<ADDR>]
      - url: [<ADDR>]
      
      Other changes:
      
      globals.yml - mention just IP in comment
      
      prechecks/port_checks (api_intf) - kolla_address handles validation
      
      3x interface conditional (swift configs: replication/storage)
      
      2x interface variable definition with hostname
      (haproxy listens; api intf)
      
      1x interface variable definition with hostname with bifrost exclusion
      (baremetal pre-install /etc/hosts; api intf)
      
      neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network
      
      basic multinode source CI job for IPv6
      
      prechecks for rabbitmq and qdrouterd use proper NSS database now
      
      MariaDB Galera Cluster WSREP SST mariabackup workaround
      (socat and IPv6)
      
      Ceph naming workaround in CI
      TODO: probably needs documenting
      
      RabbitMQ IPv6-only proto_dist
      
      Ceph ms switch to IPv6 mode
      
      Remove neutron-server ml2_type_vxlan/vxlan_group setting
      as it is not used (let's avoid any confusion)
      and could break setups without proper multicast routing
      if it started working (also IPv4-only)
      
      haproxy upgrade checks for slaves based on ipv6 addresses
      
      TODO:
      
      ovs-dpdk grabs ipv4 network address (w/ prefix len / submask)
      not supported, invalid by default because neutron_external has no address
      No idea whether ovs-dpdk works at all atm.
      
      ml2 for xenapi
      Xen is not supported too well.
      This would require working with XenAPI facts.
      
      rp_filter setting
      This would require meddling with ip6tables (there is no sysctl param).
      By default nothing is dropped.
      Unlikely we really need it.
      
      ironic dnsmasq is configured IPv4-only
      dnsmasq needs DHCPv6 options and testing in vivo.
      
      KNOWN ISSUES (beyond us):
      
      One cannot use IPv6 address to reference the image for docker like we
      currently do, see: https://github.com/moby/moby/issues/39033
      (docker_registry; docker API 400 - invalid reference format)
      workaround: use hostname/FQDN
      
      RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4.
      This is due to old RabbitMQ versions available in images.
      IPv4 is preferred by default and may fail in the IPv6-only scenario.
      This should be no problem in real life as IPv6-only is indeed IPv6-only.
      Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will
      no longer be relevant as we supply all the necessary config.
      See: https://github.com/rabbitmq/rabbitmq-server/pull/1982
      
      For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed
      to work well). Older Ansible versions are known to miss IPv6 addresses
      in interface facts. This may affect redeploys, reconfigures and
      upgrades which run after VIP address is assigned.
      See: https://github.com/ansible/ansible/issues/63227
      
      Bifrost Train does not support IPv6 deployments.
      See: https://storyboard.openstack.org/#!/story/2006689
      
      
      
      Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c
      Implements: blueprint ipv6-control-plane
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      bc053c09
  11. Oct 15, 2019
    • Ionut Balutoiu's avatar
      Fix Python3 compatibility for kolla-genpwd · e3fccdfa
      Ionut Balutoiu authored
      The method `Fernet.generate_key()` generates a binary string in Python 3:
      ```
      >>> Fernet.generate_key()
      b'qSMZlOK23pZUw_Uyy-ZRPUfPskMXKGCGmhG6AHCFiV8='
      ```
      
      Unless properly written as a string to the Kolla `passwords.yml` file,
      the Fernet key will end up in the final Barbican config like this:
      ```
      [simple_crypto_plugin]
      kek = b'qSMZlOK23pZUw_Uyy-ZRPUfPskMXKGCGmhG6AHCFiV8='
      ```
      
      Due to the fact that the key is incorrectly written to the barbican
      config file (it should be written as a string), every barbican secret
      store fails with:
      
      ```
      barbican.api.controllers   File "/var/lib/kolla/venv/lib/python3.6/site-packages/barbican/plugin/store_crypto.py", line 83, in store_secret
      barbican.api.controllers     encrypting_plugin, context.project_model)
      barbican.api.controllers   File "/var/lib/kolla/venv/lib/python3.6/site-packages/barbican/plugin/store_crypto.py", line 290, in _find_or_create_kek_objects
      barbican.api.controllers     kek_meta_dto = plugin_inst.bind_kek_metadata(kek_meta_dto)
      barbican.api.controllers   File "/var/lib/kolla/venv/lib/python3.6/site-packages/barbican/plugin/crypto/simple_crypto.py", line 104, in bind_kek_metadata
      barbican.api.controllers     encryptor = fernet.Fernet(self.master_kek)
      barbican.api.controllers   File "/var/lib/kolla/venv/lib/python3.6/site-packages/cryptography/fernet.py", line 38, in __init__
      barbican.api.controllers     "Fernet key must be 32 url-safe base64-encoded bytes."
      barbican.api.controllers ValueError: Fernet key must be 32 url-safe base64-encoded bytes.
      ```
      
      This commit fixes the issue described above by properly writing
      the Fernet key as a string to the Kolla `passwords.yml` file.
      
      Closes-Bug: #1848191
      Change-Id: I27fc0159c889bc2e1576fdd69b7d02a320b620f8
      e3fccdfa
  12. Sep 16, 2019
    • Mark Goddard's avatar
      Add custom filters for checking services · af2e7fd7
      Mark Goddard authored
      These filters can be used to capture a lot of the logic that we
      currently have in 'when' statements, about which services are enabled
      for a particular host.
      
      In order to use these filters, it is necessary to install the
      kolla_ansible python module, and not just the dependencies listed in
      requirements.txt. The CI test and quickstart install from source
      documentation has been updated accordingly.
      
      Ansible is not currently in OpenStack global requirements, so for unit
      tests we avoid a direct dependency on Ansible and provide fakes where
      necessary.
      
      Change-Id: Ib91cac3c28e2b5a834c9746b1d2236a309529556
      af2e7fd7
  13. Mar 10, 2019
  14. Jul 26, 2018
    • Eduardo Gonzalez's avatar
      Use fernet for barbican crypto key · b80a63f3
      Eduardo Gonzalez authored
      Sha password is not always valid for barbican cripto key.
      Use a fernet key so it always gets valid.
      
      Not need release note for upgrade, users with a working
      barbican not regenerate passwords, only new passwords will
      get new type.
      
      Change-Id: Ic8c4ca63219295d697062cff9cbf30fadbe49bf3
      b80a63f3
  15. May 22, 2018
    • Borne Mace's avatar
      Updated genpwd to work with python35 · f1768ef7
      Borne Mace authored
      Due to the changes in hmac.new and how binary strings
      are dumped in yaml.safe_dump some changes were needed to
      make sure that we dumped only strings, not binary strings.
      
      Change-Id: Ic2fbcf2347023c1e9e666203dfe40dbeaf24ce5f
      f1768ef7
  16. Sep 13, 2017
  17. Jun 02, 2017
  18. Apr 24, 2017
  19. Mar 30, 2017
  20. Mar 22, 2017
  21. Mar 08, 2017
    • Jeffrey Zhang's avatar
      Fix booting from volume failure · d06efcec
      Jeffrey Zhang authored
      Booting from volume require cinder's ceph client secret now. Move cinder
      before nova in site.yml, because nova depends on cinder ceph client key
      now.
      
      Change-Id: I01c9ed80843d98305b8963894c4917c21a35d3ac
      Closes-Bug: #1670676
      d06efcec
  22. Feb 15, 2017
    • Jeffrey Zhang's avatar
      Rename kolla namespace to kolla_ansible · 177fbea7
      Jeffrey Zhang authored
      * Rename kolla namespace to kolla_ansible
      * remove oslo.config.opts entry points which is uesless
      * delete useless tools/version-check.py script
      
      Change-Id: I005dd7223ff23afbb2ce8cbfd0ebec0969102798
      177fbea7
Loading