539 Commits

Author SHA1 Message Date
Zuul
0d807bc375 Merge "Use clouds.yaml for puppet" 2022-03-03 12:37:52 +00:00
ZhongShengping
df2f6c9716 Prepare Yoga M3
Update the version metadata for Yoga milestone M3

Change-Id: I8f0a2eed9ef8a60a59fd8fca1299de0cd621e6e7
20.2.0
2022-02-27 13:15:08 +00:00
Takashi Kajinami
5a4a70af4e Add CentOS/RHEL 9 to supported operating systems
... because these operating systems are now verified by unit tests and
integration tests.

Change-Id: Id55281083b841d599842484a658d5bc070899963
2022-02-23 01:29:50 +09:00
Takashi Kajinami
83f966a850 CentOS 9: Disable unit tests dependent on puppet-postgresql
The puppt-postgresql module does not support CentOS 9 yet and requires
some version parameters to be run on CentOS 9. This change disables
unit tests requiring that module, until the module supports CentOS 9.

Change-Id: I175dfd157fb3be842a3c1ed38cf3325ec9283f69
2022-02-16 00:26:49 +09:00
Takashi Kajinami
08bf393ee4 Use clouds.yaml for puppet
This change introduces the capability to load clouds.yaml file in
the base Puppet::Provider::Openstack::Auth module, so that each
providers can look up credentials from clouds.yaml instead of rc file.
When SRBAC is enforced, services require appropriate scope for each
operation and this makes it difficult to use rc files which can store
only one credential per file. Usage of clouds.yaml allows us to store
multiple credentials in a single file and switch scopes according to
the API request used.

The new implementation loads the clouds.yaml file for admin user, which
is created by puppet-keystoe. It also allows overriding the credential
by a user-created clouds.file.

We expect clouds.yaml file is created under /etc/openstack, which is
the location openstackclient searches to look up clouds.yaml. To avoid
unexpected conjunction with existing files, the files used by puppet
are located in an independent 'puppet' directory at this moment.

Change-Id: I7587f6e0c2486cbfaf2cbafeb64e9db56a817106
2022-02-11 20:23:53 +09:00
Takashi Kajinami
d90a7d8bd2 TripleO jobs: Replace CentOS 8 jobs by CentOS 9 jobs
Now TripleO team is replacing CentOS 8 jobs in master by CentOS 9 jobs.
This follows that and replaces tripleo jobs in puppet repos to switch
to CentOS 9.

Depends-on: https://review.opendev.org/828525
Change-Id: Ie7aca12db7e28bcc22a4b9ba37239452e2e9bf6e
2022-02-09 22:55:00 +09:00
Zuul
47fe665d21 Merge "Support clouds.yaml to manage keystone user credentials" 2022-01-20 18:18:56 +00:00
Takashi Kajinami
522d06ba8b Support clouds.yaml to manage keystone user credentials
Recent openstack cli supports loading user credentials from clouds.yaml
instead of passing each parameters by environment variables or command
options.

This allows us to manage user credentials more flexibly. The biggest
benefit of the clouds.yaml file is that it supports managing multiple
credentials in a single file. When SRBAC is enforced, each API request
should be made with the proper scope credential, and we need to switch
credentials for different scopes(project, domain and system) according.
Usage of clouds.yaml helps this use case hugely because it allows us to
store credentials for each scope in a single file and switch them by
the single OS_CLOUD environment variable(or the --os-cloud option).

Change-Id: Ie8246aa18d90ba506fe708be13c9a5afa3e5d2fd
2022-01-18 09:06:01 +09:00
Zuul
003aef1282 Merge "Support system/domain scope credential" 2022-01-08 00:13:46 +00:00
ZhongShengping
39ec2a0e79 Prepare Yoga M2
Update the version metadata for Yoga milestone M2

Change-Id: I46f1946ce7d57985ea8ff4c26221d3b2c7d1767e
20.1.0
2022-01-07 14:22:20 +00:00
Takashi Kajinami
e61fb1e4e2 apache: Add support for RequestHeader statements
This change introduces the new parameter to override
the apache::vhost::request_headers parameter, which is used to define
RequestHeader statements in vhost configuration.

Change-Id: I360b18acdf974bf3cdc9f8e817b66cd85f116afd
2021-12-09 01:19:11 +00:00
Takashi Kajinami
3d397fc10c Bump puppetlabs-inifile
Depends-on: https://review.opendev.org/816117
Change-Id: I0e8664f9e9b0eaedaf6405e920f65cf496388e3e
20.0.0
2021-11-02 13:07:46 +09:00
Zuul
5734cafcee Merge "policy: Make sure policy_path is an absolute path" 2021-10-21 20:55:14 +00:00
Takashi Kajinami
75b0b3d3b6 policy: Make sure policy_path is an absolute path
The policy_path parameter should be an absolute path because now this
parameter is used to manage the policy file content.

Change-Id: Ib2d41f57ab50ef225887bcad2457ffcc0911cd84
2021-10-20 17:41:13 +09:00
Takashi Kajinami
0027bf6893 Support system/domain scope credential
This change introduces the base implementation to use system scope
credential or domain scope credential to request OpenStack API in each
provider implementations.

Change-Id: If3781cd2ed828126ef1388553f4b85eed78196e7
2021-10-18 15:09:02 +00:00
Takashi Kajinami
8effa49fc0 Allow customizing separator for ini file
The api-paste.ini accepts not only "=" but also ":" and some services
like Barbican have been using ":" for their default api-paste.ini
files.

[composite:main]
use = egg:Paste#urlmap
/: barbican_version
/v1: barbican-api-keystone

This change introduces the logic to pick up separator from resource
definition, so that we can implement resource parameters to use
different separators.

Change-Id: I21ab398f5d4f96673f3e2060263a9ba6691fef98
2021-10-12 21:05:40 +09:00
Takashi Kajinami
8c592d56b5 Bump version for the start of Yoga
Bump the major version for the Yoga release after Xena has
been branched.

Change-Id: I0960372a6ea4d9f5af212445bcd61987c62aa76b
2021-10-11 11:44:06 +09:00
247b570e7b Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: I33de4aac296d7a3e4afd4c8d418d7d1c91778c06
2021-10-07 08:27:05 +00:00
ZhongShengping
12a677eed1 Add information technology in the setup.cfg
Change-Id: I96e85652f062ff45857a9f00d3b6234a80ec7836
19.4.0
2021-10-01 06:54:49 +08:00
ZhongShengping
0ab38d2377 Add license information in the setup.cfg
Change-Id: If8b7dd074e673e9bf6c1e932c0f92a9b4945458d
2021-09-30 16:48:13 +08:00
ZhongShengping
2a048e6ed3 Delete useless code for setup.py
Change-Id: I7c2d579d7faa0888490ae4d4af9adc9605e3f04c
2021-09-30 13:38:33 +08:00
Takashi Kajinami
5e7a42550b Stop configuring install_command in tox.
It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

Change-Id: Ib5e7b1fc9f958b3f1ab28295aec36fb4bf970469
Co-Authored-By: tushargite96 <tushargite96@gmail.com>
2021-09-29 18:15:06 +09:00
Zuul
549f1488da Merge "Fix pbr>=2.0.0 for setup.py" 2021-09-29 09:06:52 +00:00
ZhongShengping
9a7dcc37b4 Fix pbr>=2.0.0 for setup.py
Change-Id: Ia0aab587b736a01c7e0442094fdaed201bd8b2c0
2021-09-29 16:37:10 +08:00
ZhongShengping
c43dbebd9f Update openstackdocstheme to the latest version
Change-Id: I37eeba8d9201d690f46f09c8097e71a54350ad0a
2021-09-29 16:06:50 +08:00
ZhongShengping
ab0581fc9c Update reno to the latest version
Change-Id: I9072926f0d3abb75c88a66f65fd28c635da151c0
2021-09-28 17:14:35 +08:00
Tobias Urdin
16ce2f30de Prevent --password from leaking in failed command output
There is cases when a command times out or when it fails
that we and Puppet [1] will output the raw command that
was executed.

For a user create command that output contains the
--password argument passed down to openstack CLI which
causes sensitive passwords to be leaked into log files
of the system executing Puppet, these can then be shipped
of from the system into a remote syslog and still be in
plain text.

This tries to use Ruby gsub with a regular expression
matching the two cases and instead output [redacted secret]
the same way we do with config provider.

[1] https://github.com/puppetlabs/puppet/blob/main/lib/puppet/util/execution.rb#L286

Change-Id: I4cad8f88fc7b67bb7aa4330832fc47bac41ae9df
2021-09-23 17:03:59 +00:00
Takashi Kajinami
a5cb8965d5 Fix unit tests incompatible with puppetlab-stdlib 8.0.0
Since puppetlabs-stdlib 8.0.0, ensure_packages automatically translates
'ensure => present'  to 'ensure => installed' and that translation
breaks existing assertions in unit tests.

Change-Id: I35500af08e39725bab61be036f780c74e38313b9
2021-09-23 17:03:52 +00:00
ZhongShengping
9458829780 Fix stdlib version in metadata
puppetlabs-stdlib is now using the 8.0.0 version, so we should fix the
stdlib version in metadata.

Change-Id: I1e195d5b32d347c22c6131cbf0dda00d18b93cf3
2021-09-23 19:44:22 +08:00
Zuul
ad47bad388 Merge "CredentialsV3: Ensure all attributes are cleared by unset" 2021-09-20 08:38:03 +00:00
ZhongShengping
a339e85ed4 Prepare Xena RC1
Update the version metadata for Xena milestone RC1

Change-Id: I1ab3a36e305df4243a1879495a909bda46a63262
2021-09-17 17:36:10 +08:00
ZhongShengping
707f8bc08e Prepare Xena M3
Update the version metadata for Xena milestone M3

Change-Id: I947bc6b7ad20a14c89812a8078643f0a5bc126b5
19.3.0
2021-09-06 15:32:08 +08:00
Takashi Kajinami
d1eb834a20 CredentialsV3: Ensure all attributes are cleared by unset
Currently the unset method only clears attributes defined in the base
Crednetial class and ones specific to CredentialV3 are left set.
This change ensures the method clears all attributes.

Closes-Bug: #1942145
Change-Id: I4bddbf9bb3c6251aa8b68a8bc2ef8799f3c8065e
2021-08-31 13:19:29 +09:00
Zuul
4777632b6f Merge "Re-implement openstacklib::policy" 2021-08-24 09:22:44 +00:00
Takashi Kajinami
495701901e Support Puppet 7
Puppet 7 has been tested in CI for a while but we haven't seen any
issue with it. Let's officially support the version.

Change-Id: I332ed0d82024be17a036bfa45d81744cc0ef0e46
2021-08-16 18:10:25 +09:00
Takashi Kajinami
2a53c66ed3 Re-implement openstacklib::policy
openstacklib::policy has never been used in any other modules because
it was implemented as a class not reusable for each service.
This change re-implements openstacklib::policy as a defined resource
type so that we can use this implementation from each puppet modules.

The openstacklib::policy resource type provides the purge_config
parameter. When this parameter is set to true, a policy file is cleared
during configuration process. This allows users to remove any existing
rules before applying their own (no) rules.

Change-Id: I9bb486c9191c50c11717dcb9c6af00d17c3aa8f5
2021-08-10 10:25:12 +09:00
ZhongShengping
70b064d3bd Prepare Xena M2
Update the version metadata for Xena milestone M2

Change-Id: Ica0d9481da151404da59b288befb7533bdfaaefe
19.2.0
2021-07-26 19:03:47 +08:00
Thomas Goirand
508fc7adde Get rid of the $pyvers variable
Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: I371ef3a2e257e6d197238e7e9cbfd9d445405be5
19.1.0
2021-06-29 08:06:57 +09:00
Zuul
de68e1eace Merge "Add support for iscsid configuration" 2021-06-28 10:47:27 +00:00
Takashi Kajinami
6e67434c27 Add support for iscsid configuration
The iscsid service is used in sevral components like nova, cinder,
glance and so on to connect to iscsi devices. This change introduces
the new class to manage basic configuration of the iscsid service.

Co-authored-by: Alfredo Moralejo <amoralej@redhat.com>
Change-Id: I3fc6d1192632cc1458d00900508d548f522e9cdb
2021-06-04 20:40:50 +09:00
Zuul
20a4cbd1c4 Merge "Set fixture paths for unit tests" 2021-06-03 00:33:10 +00:00
Takashi Kajinami
55188f078a Set fixture paths for unit tests
This change defines manifest_dir and module_path expicitly in unit
tests so that modules installed under fixtures directory is properly
loaded.

Closes-Bug: #1930403
Change-Id: Id2e226593fa9005e8c051bb714e4c341114f640f
2021-06-02 14:12:26 +09:00
ZhongShengping
dd1287bf02 Prepare Xena M1
Update the version metadata for Xena milestone M1

Change-Id: I21b1a3c895fd84ff8c99d279eaf5d0f1ced31f4f
2021-05-28 02:40:19 +00:00
Takashi Kajinami
f0b36283fe Drop Fedora support
Fedora support is never tested, and has been unmaintained for a while.
Because we don't expect any actual user using OpenStack on Fedora, this
change drops support for Fedora directly.

Change-Id: I63c96cd92bad210c0a9527c59f8e1347967172a3
19.0.0
2021-05-26 23:06:00 +09:00
91bd836fe5 Set python versions for rhel > 8
EL8 was shipped with python 3.6, EL9 is being shipped with
python 3.9, so let's set python versions accordingly.

Change-Id: I5d857a3fbab2143c490016cd6b9cfc78ecb382e5
2021-05-26 23:03:37 +09:00
Zuul
d2782eef68 Merge "TripleO: Do not use an independent content provide job" 2021-05-22 07:04:36 +00:00
ramishra
0699227b3c Replace URI.escape() with ERB::Util.url_encode()
URI.escape() method has been removed in ruby 3 and
the newly added Puppet::Util.rfc2396_escape()[1]
has not been released yet.

[1] 41dcae71c7

Closes-Bug: #1928685
Change-Id: I001d579a1b126fc8254f071ddbecda5cc6de7231
2021-05-20 12:13:12 +05:30
Takashi Kajinami
49dcf58467 TripleO: Do not use an independent content provide job
The tripleo-puppet-standalone template introduces a content provider
job and a subsequent job to use containers built by the content
provider job. This is inefficient because we run only a single tripleo
job.

Change-Id: Idb5b832d3243fd32b7d48615c7f41f96ce9054b8
2021-05-14 15:01:26 +09:00
YuehuiLei
17b2f963d4 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I4085943c67b6866cf98247a4200c4d281ed4b4ff
2021-05-12 07:12:52 +00:00
Takashi Kajinami
5982115b98 Fix lint error with the latest lint packages
This change fixes the following lint error which is detected since we
removed pin of lint packages.

manifests/openstackclient.pp:18:WARNING: class included by absolute
name (::$class)

Change-Id: Idcc8db91bda9b71e0ed5f05f7f4c9fe587ae6b0b
2021-05-12 10:53:24 +09:00