Skip to content
Snippets Groups Projects
  1. 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
  2. Aug 28, 2020
  3. 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
  4. Aug 24, 2020
  5. 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
  6. 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
  7. Jun 07, 2020
  8. May 15, 2020
  9. Apr 16, 2020
  10. 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
  11. 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
  12. 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
  13. Mar 02, 2020
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. Sep 17, 2019
  21. 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
  22. 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
  23. 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
  24. 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
  25. Jun 17, 2019
  26. Jun 14, 2019
  27. 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
  28. 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
  29. May 02, 2019
    • Raimund Hook's avatar
      Updating Jinja filters to conform to Ansible 2.5+ · 84ea42bd
      Raimund Hook authored
      Since Ansible 2.5, the use of jinja tests as filters has been
      deprecated.
      
      I've run the script provided by the ansible team to 'fix' the
      jinja filters to conform to the newer syntax.
      
      This fixes the deprecation warnings.
      
      Change-Id: I844ecb7bec94e561afb09580f58b1bf83a6d00bd
      Closes-bug: #1827370
      84ea42bd
  30. Apr 02, 2019
    • Mark Goddard's avatar
      Fix up config file permissions on the host · a4bb8567
      Mark Goddard authored
      Several config file permissions are incorrect on the host. In general,
      files should be 0660, and directories and executables 0770.
      
      Change-Id: Id276ac1864f280554e98b937f2845bb424d521de
      Closes-Bug: #1821579
      a4bb8567
  31. Feb 08, 2019
    • Jim Rollenhagen's avatar
      Allow keystone services to use independent hostnames · bece976b
      Jim Rollenhagen authored
      This allows keystone service endpoints to use custom hostnames, and adds the
      following variables:
      
      * keystone_internal_fqdn
      * keystone_external_fqdn
      
      These default to the old values of kolla_internal_fqdn or
      kolla_external_fqdn.
      
      This also adds the following variables:
      
      * keystone_admin_listen_port
      * keystone_public_listen_port
      
      These default to keystone_admin_port and keystone_public_port,
      respectively, for backward compatibility.
      
      These options allow the user to differentiate between the port the
      service listens on, and the port the service is reachable on. This is
      useful for external load balancers which live on the same host as the
      service itself.
      
      Change-Id: I50c46c674134f9958ee4357f0f4eed5483af2214
      Implements: blueprint service-hostnames
      bece976b
  32. Nov 26, 2018
    • Eduardo Gonzalez's avatar
      Support stop specific containers · 1a682fab
      Eduardo Gonzalez authored
      With this change, an operator may be able to stop a
      service container without stopping all services in a host.
      This change is the starting point to start
      fast-forward upgrades support.
      In next changes new flags will be introducced to disable
      stop dataplane services during upgrades.
      
      Change-Id: Ifde7a39d7d8596ef0d7405ecf1ac1d49a459d9ef
      Implements: blueprint support-stop-containers
      1a682fab
  33. Nov 19, 2018
    • caoyuan's avatar
      Use correct variable for default certificate paths · 9223deee
      caoyuan authored
      The variable {{ node_config_directory }} is used for the configuration
      directory on the remote hosts, and should not be used for paths on the
      deploy host (localhost).
      
      This changes the default value of the TLS certificate and CA file to
      reference {{ CONFIG_DIR }}, in line with the directory used for
      admin-openrc.sh (as of I0709482ead4b7a67e82796e17f85bde151e71bc0).
      
      This change also introduces a variable, {{ node_config }}, that
      references {{ CONFIG_DIR | default('/etc/kolla') }}, to remove
      duplication.
      
      Change-Id: Ibd82ac78630ebfff5824c329d7399e1e900c0ee0
      Closes-Bug: #1804025
      9223deee
  34. Nov 03, 2018
  35. Sep 26, 2018
    • Adam Harwell's avatar
      Refactor haproxy config (split by service) V2.0 · f1c81365
      Adam Harwell authored
      Having all services in one giant haproxy file makes altering
      configuration for a service both painful and dangerous. Each service
      should be configured with a simple set of variables and rendered with a
      single unified template.
      
      Available are two new templates:
      
      * haproxy_single_service_listen.cfg.j2: close to the original style, but
      only one service per file
      * haproxy_single_service_split.cfg.j2: using the newer haproxy syntax
      for separated frontend and backend
      
      For now the default will be the single listen block, for ease of
      transition.
      
      Change-Id: I6e237438fbc0aa3c89a3c8bd706a53b74e71904b
      f1c81365
  36. Aug 14, 2018
  37. Aug 13, 2018
    • caoyuan's avatar
      Update usage of "|" to "is" · 471985dc
      caoyuan authored
      With the more recent versions of ansible, we should now use
      "is" instead of the "|"
      
      This should update it.
      
      Change-Id: I6fba56fca182349972e8b0ee5452b37aa4090e0c
      471985dc
  38. Jul 26, 2018
    • Lakshmi Prasanna Goutham Pratapa's avatar
      Apply Resource Constraints to Services. · 14bf5247
      Lakshmi Prasanna Goutham Pratapa authored
      This commit is to apply resource-constraints to a few more OpenStack services.
      Commit to  apply constraints to the last set of services will be made in
      the upcoming commit.
      
      Depends-on: Icafa54baca24d2de64238222a5677b9d8b90e2aa
      Change-Id: I39004f54281f97d53dfa4b1dbcf248650ad6f186
      14bf5247
  39. Jul 25, 2018
Loading