Skip to content
Snippets Groups Projects
  1. Jan 09, 2022
    • Stig Telfer's avatar
      OpenID Connect certifiate file is optional · 78f29fdc
      Stig Telfer authored
      Some ID provider configurations do not require a certificate file.
      Change the logic to allow this, and update documentation accordingly.
      
      Change-Id: I2c34a6b5894402bbebeb3fb96768789bc3c7fe84
      78f29fdc
  2. Sep 28, 2021
    • Niklas Hagman's avatar
      Transition Keystone admin user to system scope · 2e933dce
      Niklas Hagman authored
      A system-scoped token implies the user has authorization to act on the
      deployment system. These tokens are useful for interacting with
      resources that affect the deployment as a whole, or exposes resources
      that may otherwise violate project or domain isolation.
      
      Since Queens, the keystone-manage bootstrap command assigns the admin
      role to the admin user with system scope, as well as in the admin
      project. This patch transitions the Keystone admin user from
      authenticating using project scoped tokens to system scoped tokens.
      This is a necessary step towards being able to enable the updated oslo
      policies in services that allow finer grained access to system-level
      resources and APIs.
      
      An etherpad with discussion about the transition to the new oslo
      service policies is:
      
      https://etherpad.opendev.org/p/enabling-system-scope-in-kolla-ansible
      
      
      
      Change-Id: Ib631e2211682862296cce9ea179f2661c90fa585
      Signed-off-by: default avatarNiklas Hagman <ubuntu@post.blinkiz.com>
      2e933dce
  3. Aug 17, 2021
    • Michal Arbet's avatar
      Use Docker healthchecks for keystone-fernet container · 90fd9152
      Michal Arbet authored
      This change enables the use of Docker healthchecks for
      keystone-fernet container. It checks if "key 0" has
      right permissions, and if rsync is able to distribute
      keys to other keystones.
      
      Implements: blueprint container-health-check
      Change-Id: I17bea723d4109e869cd05d211f6f8e4653f46e17
      90fd9152
  4. Aug 10, 2021
    • Radosław Piliszek's avatar
      Refactor and optimise image pulling · 9ff2ecb0
      Radosław Piliszek authored
      We get a nice optimisation by using a filtered loop instead
      of task skipping per service with 'when'.
      
      Partially-Implements: blueprint performance-improvements
      Change-Id: I8f68100870ab90cb2d6b68a66a4c97df9ea4ff52
      9ff2ecb0
  5. Jul 15, 2021
  6. Mar 13, 2021
  7. Feb 15, 2021
    • Pedro Henrique's avatar
      Add support to OpenID Connect Authentication flow · f3fbe837
      Pedro Henrique authored
      
      This pull request adds support for the OpenID Connect authentication
      flow in Keystone and enables both ID and access token authentication
      flows. The ID token configuration is designed to allow users to
      authenticate via Horizon using an identity federation; whereas the
      Access token is used to allow users to authenticate in the OpenStack CLI
      using a federated user.
      
      Without this PR, if one wants to configure OpenStack to use identity
      federation, he/she needs to do a lot of configurations in the keystone,
      Horizon, and register quite a good number of different parameters using
      the CLI such as mappings, identity providers, federated protocols, and
      so on. Therefore, with this PR, we propose a method for operators to
      introduce/present the IdP's metadata to Kolla-ansible, and based on the
      presented metadata, Kolla-ansible takes care of all of the
      configurations to prepare OpenStack to work in a federated environment.
      
      Implements: blueprint add-openid-support
      Co-Authored-By: default avatarJason Anderson <jasonanderson@uchicago.edu>
      Change-Id: I0203a3470d7f8f2a54d5e126d947f540d93b8210
      f3fbe837
  8. Dec 14, 2020
    • Mark Goddard's avatar
      Revert "Performance: Use import_tasks in the main plays" · db4fc85c
      Mark Goddard authored
      This reverts commit 9cae59be.
      
      Reason for revert: This patch was found to introduce issues with fluentd customisation. The underlying issue is not currently fully understood, but could be a sign of other obscure issues.
      
      Change-Id: Ia4859c23d85699621a3b734d6cedb70225576dfc
      Closes-Bug: #1906288
      db4fc85c
  9. Oct 27, 2020
    • Radosław Piliszek's avatar
      Do not set 'always' tag where unnecessary · 71e9c603
      Radosław Piliszek authored
      Makes 'import_tasks' not change behaviour compared to
      'include_tasks'.
      
      Change-Id: I600be7c3bd763b3b924bd4a45b4e7b4dca7a33e3
      71e9c603
    • Radosław Piliszek's avatar
      Performance: Use import_tasks in the main plays · 9cae59be
      Radosław Piliszek authored
      Main plays are action-redirect-stubs, ideal for import_tasks.
      
      This avoids 'include' penalty and makes logs/ara look nicer.
      
      Fixes haproxy and rabbitmq not to check the host group as well.
      
      Change-Id: I46136fc40b815e341befff80b54a91ef431eabc0
      Partially-Implements: blueprint performance-improvements
      9cae59be
  10. Oct 12, 2020
    • Radosław Piliszek's avatar
      Performance: optimize genconfig · 3411b9e4
      Radosław Piliszek authored
      Config plays do not need to check containers. This avoids skipping
      tasks during the genconfig action.
      
      Ironic and Glance rolling upgrades are handled specially.
      
      Swift and Bifrost do not use the handlers at all.
      
      Partially-Implements: blueprint performance-improvements
      Change-Id: I140bf71d62e8f0932c96270d1f08940a5ba4542a
      3411b9e4
  11. Oct 05, 2020
    • Michal Nasiadka's avatar
      Use Docker healthchecks for core services · c52a89ae
      Michal Nasiadka authored
      This change enables the use of Docker healthchecks for core OpenStack
      services.
      Also check-failures.sh has been updated to treat containers with
      unhealthy status as failed.
      
      Implements: blueprint container-health-check
      Change-Id: I79c6b11511ce8af70f77e2f6a490b59b477fefbb
      c52a89ae
  12. Aug 28, 2020
  13. Aug 25, 2020
    • wu.chunyang's avatar
      add region name for tasks · 60dc0128
      wu.chunyang authored
      when use multiple regions, those tasks always get a wrong endpoint.
      
      Change-Id: Ie164687b2ffd80cedf8a00e7f705b73fccd416e2
      60dc0128
  14. Aug 24, 2020
  15. Aug 13, 2020
    • Mark Goddard's avatar
      Prevent overwriting existing Keystone Fernet keys · 8389140f
      Mark Goddard authored
      Steps to reproduce:
      
      * Deploy a cloud
      * Add another controller to the inventory
      * Deploy to the new controller using --limit:
      
      kolla-ansible deploy --limit new-controller
      
      Expected results:
      
      The new controller uses the cluster's existing fernet keys.
      
      Actual results:
      
      New fernet keys are generated on the new controller, and pushed out to
      the existing controllers. This invalidates tokens created from those
      keys.
      
      This change prevents the above scenario from happening, by failing the
      deployment if there are no hosts with existing Ferney keys to
      distribute, and not all Keystone hosts are in the target host list.
      
      Closes-Bug: #1891364
      
      Change-Id: If0c0e038b77fc010a3a017f9841a674d53b16457
      8389140f
  16. Jul 28, 2020
    • Mark Goddard's avatar
      Performance: use import_tasks for check-containers.yml · 9702d4c3
      Mark Goddard authored
      Including tasks has a performance penalty when compared with importing
      tasks. If the include has a condition associated with it, then the
      overhead of the include may be lower than the overhead of skipping all
      imported tasks. In the case of the check-containers.yml include, the
      included file only has a single task, so the overhead of skipping this
      task will not be greater than the overhead of the task import. It
      therefore makes sense to switch to use import_tasks there.
      
      Partially-Implements: blueprint performance-improvements
      
      Change-Id: I65d911670649960708b9f6a4c110d1a7df1ad8f7
      9702d4c3
  17. Jun 07, 2020
  18. May 15, 2020
  19. Apr 16, 2020
  20. Apr 09, 2020
    • James Kirsch's avatar
      Add support for encrypting backend Keystone HAProxy traffic · b475643c
      James Kirsch authored
      This patch introduces an optional backend encryption for Keystone
      service. When used in conjunction with enabling TLS for service API
      endpoints, network communcation will be encrypted end to end, from
      client through HAProxy to the Keystone service.
      
      Change-Id: I6351147ddaff8b2ae629179a9bc3bae2ebac9519
      Partially-Implements: blueprint add-ssl-internal-network
      b475643c
  21. Mar 27, 2020
    • linpeiwen's avatar
      keystone roles container name variable · 56591770
      linpeiwen authored
      keystone and keystone_fernet container name variable is fixed
      in some places, but in the defaults directory, keystone
      and keystone_fernet container_name variable is variable.
      If the keystone and keystone_fernet container_name variable is
      changed during deployment, it will not be assigned to keystone
      and keystone_fernet, but a fixed 'keystone' and 'keystone_fernet' name.
      
      Change-Id: Ifc8ac69e6abc4586f0e4fd820b9022aea9f76396
      56591770
  22. Mar 10, 2020
    • yj.bai's avatar
      Add notify restart container when cert changed · d3cc2f67
      yj.bai authored
      
      When change the cert file in /etc/kolla/certificate/.
      The certificate in the container has not changed.
      So I think can use kolla-ansible deploy when certificate is
      changed. restart <container>
      
      Partially-Implements: blueprint custom-cacerts
      
      Change-Id: Iaac6f37e85ffdc0352e8062ae5049cc9a6b3db26
      Signed-off-by: default avataryj.bai <bai.yongjun@99cloud.net>
      d3cc2f67
  23. Mar 02, 2020
  24. Feb 28, 2020
    • Mark Goddard's avatar
      Add Ansible group check to prechecks · 49fb55f1
      Mark Goddard authored
      We assume that all groups are present in the inventory, and quite obtuse
      errors can result if any are not.
      
      This change adds a precheck that checks for the presence of all expected
      groups in the inventory for each service. It also introduces a common
      service-precheck role that we can use for other common prechecks.
      
      Change-Id: Ia0af1e7df4fff7f07cd6530e5b017db8fba530b3
      Partially-Implements: blueprint improve-prechecks
      49fb55f1
  25. Feb 03, 2020
    • Michal Nasiadka's avatar
      Fix keystone fernet bootstrap · 0799782c
      Michal Nasiadka authored
      There are cases when a multinode deployment ends up in unusable
      keystone public wsgi on some nodes.
      
      The root cause is that keystone public wsgi doesn't find fernet
      keys on startup - and then persists on sending 500 errors to any
      requests - due to a race condition between
      fernet_setup/fernet-push.sh and keystone startup.
      
      Depends-On: https://review.opendev.org/703742/
      Change-Id: I63709c2e3f6a893db82a05640da78f492bf8440f
      Closes-Bug: #1846789
      0799782c
  26. Jan 28, 2020
    • James Kirsch's avatar
      Copy CA into containers. · 511ba9f6
      James Kirsch authored
      When kolla_copy_ca_into_containers is set to "yes", the Certificate
      Authority in /etc/kolla/certificates will be copied into service
      containers to enable trust for that CA. This is especially useful when
      the CA is self signed, and would not be trusted by default.
      
      Partially-Implements: blueprint custom-cacerts
      
      Change-Id: I4368f8994147580460ebe7533850cf63a419d0b4
      511ba9f6
  27. Dec 09, 2019
    • Mark Goddard's avatar
      Use local python interpreter for keystone cron generator · e46d6025
      Mark Goddard authored
      We generate the keystone cron schedule via a python script on localhost.
      Currently this always uses 'python', however this may not be available
      on some systems.
      
      This change switches to use the same python interpreter as used by
      ansible-playbook.
      
      Partially-Implements: blueprint python-3
      
      Change-Id: I6007f8d6880f418a503766cec21a330c44e5b80f
      e46d6025
  28. Nov 22, 2019
    • Michal Nasiadka's avatar
      Change local_action to delegate_to: localhost · 10099311
      Michal Nasiadka authored
      As part of the effort to implement Ansible code linting in CI
      (using ansible-lint) - we need to implement recommendations from
      ansible-lint output [1].
      
      One of them is to stop using local_action in favor of delegate_to -
      to increase readability and and match the style of typical ansible
      tasks.
      
      [1]: https://review.opendev.org/694779/
      
      Partially implements: blueprint ansible-lint
      
      Change-Id: I46c259ddad5a6aaf9c7301e6c44cd8a1d5c457d3
      10099311
  29. Sep 26, 2019
    • Kris Lindgren's avatar
      Add a job that *only* deploys updated containers · 2fe0d98e
      Kris Lindgren authored
      Sometimes as cloud admins, we want to only update code that is running
      in a cloud.  But we dont need to do anything else.  Make an action in
      kolla-ansible that allows us to do that.
      
      Change-Id: I904f595c69f7276e71692696471e32fd1f88e6e8
      Implements: blueprint deploy-containers-action
      2fe0d98e
  30. Sep 17, 2019
  31. Aug 16, 2019
    • Scott Solkhon's avatar
      Support configuration of trusted CA certificate file · 09e02ef8
      Scott Solkhon authored
      This commit adds the functionality for an operator to specify
      their own trusted CA certificate file for interacting with the
      Keystone API.
      
      Implements: blueprint support-trusted-ca-certificate-file
      Change-Id: I84f9897cc8e107658701fb309ec318c0f805883b
      09e02ef8
  32. Jul 18, 2019
    • Radosław Piliszek's avatar
      Fix handling of docker restart policy · 6a737b19
      Radosław Piliszek authored
      Docker has no restart policy named 'never'. It has 'no'.
      This has bitten us already (see [1]) and might bite us again whenever
      we want to change the restart policy to 'no'.
      
      This patch makes our docker integration honor all valid restart policies
      and only valid restart policies.
      All relevant docker restart policy usages are patched as well.
      
      I added some FIXMEs around which are relevant to kolla-ansible docker
      integration. They are not fixed in here to not alter behavior.
      
      [1] https://review.opendev.org/667363
      
      
      
      Change-Id: I1c9764fb9bbda08a71186091aced67433ad4e3d6
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      6a737b19
  33. Jul 12, 2019
    • Mark Goddard's avatar
      During deploy, always sync DB · d5e5e885
      Mark Goddard authored
      A common class of problems goes like this:
      
      * kolla-ansible deploy
      * Hit a problem, often in ansible/roles/*/tasks/bootstrap.yml
      * Re-run kolla-ansible deploy
      * Service fails to start
      
      This happens because the DB is created during the first run, but for some
      reason we fail before performing the DB sync. This means that on the second run
      we don't include ansible/roles/*/tasks/bootstrap_service.yml because the DB
      already exists, and therefore still don't perform the DB sync. However this
      time, the command may complete without apparent error.
      
      We should be less careful about when we perform the DB sync, and do it whenever
      it is necessary. There is an argument for not doing the sync during a
      'reconfigure' command, although we will not change that here.
      
      This change only always performs the DB sync during 'deploy' and
      'reconfigure' commands.
      
      Change-Id: I82d30f3fcf325a3fdff3c59f19a1f88055b566cc
      Closes-Bug: #1823766
      Closes-Bug: #1797814
      d5e5e885
  34. Jun 27, 2019
    • Mark Goddard's avatar
      Simplify handler conditionals · de00bf49
      Mark Goddard authored
      Currently, we have a lot of logic for checking if a handler should run,
      depending on whether config files have changed and whether the
      container configuration has changed. As rm_work pointed out during
      the recent haproxy refactor, these conditionals are typically
      unnecessary - we can rely on Ansible's handler notification system
      to only trigger handlers when they need to run. This removes a lot
      of error prone code.
      
      This patch removes conditional handler logic for all services. It is
      important to ensure that we no longer trigger handlers when unnecessary,
      because without these checks in place it will trigger a restart of the
      containers.
      
      Implements: blueprint simplify-handlers
      
      Change-Id: I4f1aa03e9a9faaf8aecd556dfeafdb834042e4cd
      de00bf49
    • Mark Goddard's avatar
      Don't rotate keystone fernet keys during deploy · 09e29d0d
      Mark Goddard authored
      When running deploy or reconfigure for Keystone,
      ansible/roles/keystone/tasks/deploy.yml calls init_fernet.yml,
      which runs /usr/bin/fernet-rotate.sh, which calls keystone-manage
      fernet_rotate.
      
      This means that a token can become invalid if the operator runs
      deploy or reconfigure too often.
      
      This change splits out fernet-push.sh from the fernet-rotate.sh
      script, then calls fernet-push.sh after the fernet bootstrap
      performed in deploy.
      
      Change-Id: I824857ddfb1dd026f93994a4ac8db8f80e64072e
      Closes-Bug: #1833729
      09e29d0d
  35. Jun 17, 2019
  36. Jun 14, 2019
  37. Jun 06, 2019
    • Mark Goddard's avatar
      Use become for all docker tasks · b123bf66
      Mark Goddard authored
      Many tasks that use Docker have become specified already, but
      not all. This change ensures all tasks that use the following
      modules have become:
      
      * kolla_docker
      * kolla_ceph_keyring
      * kolla_toolbox
      * kolla_container_facts
      
      It also adds become for 'command' tasks that use docker CLI.
      
      Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
      b123bf66
  38. May 17, 2019
    • Mark Goddard's avatar
      Fix keystone fernet key rotation scheduling · 6c1442c3
      Mark Goddard authored
      Right now every controller rotates fernet keys. This is nice because
      should any controller die, we know the remaining ones will rotate the
      keys. However, we are currently over-rotating the keys.
      
      When we over rotate keys, we get logs like this:
      
       This is not a recognized Fernet token <token> TokenNotFound
      
      Most clients can recover and get a new token, but some clients (like
      Nova passing tokens to other services) can't do that because it doesn't
      have the password to regenerate a new token.
      
      With three controllers, in crontab in keystone-fernet we see the once a day
      correctly staggered across the three controllers:
      
      ssh ctrl1 sudo cat /etc/kolla/keystone-fernet/crontab
      0 0 * * * /usr/bin/fernet-rotate.sh
      ssh ctrl2 sudo cat /etc/kolla/keystone-fernet/crontab
      0 8 * * * /usr/bin/fernet-rotate.sh
      ssh ctrl3 sudo cat /etc/kolla/keystone-fernet/crontab
      0 16 * * * /usr/bin/fernet-rotate.sh
      
      Currently with three controllers we have this keystone config:
      
      [token]
      expiration = 86400 (although, keystone default is one hour)
      allow_expired_window = 172800 (this is the keystone default)
      
      [fernet_tokens]
      max_active_keys = 4
      
      Currently, kolla-ansible configures key rotation according to the following:
      
         rotation_interval = token_expiration / num_hosts
      
      This means we rotate keys more quickly the more hosts we have, which doesn't
      make much sense.
      
      Keystone docs state:
      
         max_active_keys =
           ((token_expiration + allow_expired_window) / rotation_interval) + 2
      
      For details see:
      https://docs.openstack.org/keystone/stein/admin/fernet-token-faq.html
      
      Rotation is based on pushing out a staging key, so should any server
      start using that key, other servers will consider that valid. Then each
      server in turn starts using the staging key, each in term demoting the
      existing primary key to a secondary key. Eventually you prune the
      secondary keys when there is no token in the wild that would need to be
      decrypted using that key. So this all makes sense.
      
      This change adds new variables for fernet_token_allow_expired_window and
      fernet_key_rotation_interval, so that we can correctly calculate the
      correct number of active keys. We now set the default rotation interval
      so as to minimise the number of active keys to 3 - one primary, one
      secondary, one buffer.
      
      This change also fixes the fernet cron job generator, which was broken
      in the following cases:
      
      * requesting an interval of more than 1 day resulted in no jobs
      * requesting an interval of more than 60 minutes, unless an exact
        multiple of 60 minutes, resulted in no jobs
      
      It should now be possible to request any interval up to a week divided
      by the number of hosts.
      
      Change-Id: I10c82dc5f83653beb60ddb86d558c5602153341a
      Closes-Bug: #1809469
      6c1442c3
Loading