Commit graph

386 commits

Author SHA1 Message Date
Laurent Indermuehle
7049a280cb
Refactor setup_mysql into setup_controller 2023-01-04 17:29:06 +01:00
Laurent Indermuehle
405b809a86
Linting 2023-01-04 17:17:53 +01:00
Laurent Indermuehle
1c863da888
Simplify version computation 2023-01-04 17:17:31 +01:00
Laurent Indermuehle
17f8ecef35
Fix replication due to usage of gateway_addr instead of localhost 2023-01-04 17:16:54 +01:00
Laurent Indermuehle
72b3ecb6da
Fix database not selected 2023-01-04 17:16:37 +01:00
Laurent Indermuehle
87acd3d303
Add static test with replication containers 2023-01-04 17:16:29 +01:00
Laurent Indermuehle
1e03a259fb
Fix replication server_id already in use 2023-01-04 17:16:03 +01:00
Laurent Indermuehle
c3458f4823
Cut docker healthcheck unsupported by GHA 2023-01-04 17:10:37 +01:00
Laurent Indermuehle
b821db97c5
Generalize mysql and mariadb version based on container name
This way we can split db_engine and db_version and simplify tests.
Also this is mandatory to use the matrix.db_engine_version as the
image name for our services containers.
2023-01-04 14:14:13 +01:00
Laurent Indermuehle
90266f1ad5
De-duplicate the mysql_command alias 2023-01-04 13:15:24 +01:00
Laurent Indermuehle
4b6617ab50
Swap MariaDB with MySQL 2023-01-04 11:38:09 +01:00
Laurent Indermuehle
b72ca0d214
Prepare controller with Podman/Docker Network
We use the Podman/Docker network gateway address to communicate between
container. I haven't tested Docker. I would have preferred to use a pod
but only Podman support it and ansible-test only support the
--docker-network option.
2023-01-04 11:23:39 +01:00
Laurent Indermuehle
06666690eb
Fix package name and missing apt cache 2023-01-03 17:48:43 +01:00
Laurent Indermuehle
676509e88d
Install mysql_client the correct way 2023-01-03 15:17:47 +01:00
Laurent Indermuehle
0cd57adbd2
Add mysql_client to the controller 2023-01-03 15:13:49 +01:00
Laurent Indermuehle
cd9f216319
Further disable tests to speed up 2023-01-03 15:13:30 +01:00
Laurent Indermuehle
8652a9a947
Disable sanity, units and matrix to speed up tests in GHA 2023-01-03 14:33:11 +01:00
Laurent Indermuehle
60c87abca0
Disable healthcheck
I want to first prove that this setup is possible before adding safety
2023-01-03 14:31:16 +01:00
Laurent Indermuehle
589a0decfd
Cut anchors currently unsupported by GHA 2023-01-03 14:07:54 +01:00
Laurent Indermuehle
2149261e92
Attempt GHA communication between container using "docker host network"
https://docs.github.com/en/actions/using-containerized-services/about-service-containers
I re-revert the workflow to use the new custom action. But I'm not sure
it will works because I don't know how the container for ansible-test
is started and if it will have access to the services containers.
2023-01-03 14:05:36 +01:00
Andrew Klychkov
3ff1fad5f3
Docs: change yes/no to true/false (#480) 2023-01-03 11:24:59 +01:00
hubiongithub
8a579b42e3
add service name to plugin pam/auth_pam usage (#445)
* add service name to plugin pam/auth_pam usage

* typo fixed

* MySLQ is using identified with auth_pam by ...  instead of identified with pam using ... like mariadb does

* a : in description lines breaks yaml syntax

* clearify documentation and add changelog fragment

* Update changelogs/fragments/445_add_service_name_to_plugin_pam_auth_pam_usage.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Update plugins/module_utils/user.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2023-01-03 09:47:11 +01:00
Laurent Indermuehle
634d1fb5f0
Fix workflow unknown option container_name 2022-12-09 15:40:21 +01:00
Laurent Indermühle
574fef5e50
Merge branch 'main' into lie_tests_using_containers 2022-12-09 15:33:33 +01:00
Laurent Indermuehle
eec9f972cc
Add path to default-file
/root doesn't exist with --venv
2022-12-09 15:22:41 +01:00
Laurent Indermuehle
01e664fb25
Fix comparison
We are not logged in as 127.0.0.1 anymore, but 10.88... as I couldn't
test this easily, I decided to simplify the test.
2022-12-09 15:22:41 +01:00
Laurent Indermuehle
d98aa89ada
Cut target filtering 2022-12-09 15:22:41 +01:00
Laurent Indermuehle
d06cefa62d
Revert to old workflow to use ansible-test --venv
It seams that that ansible-test-gh-action doesn't handle this option:
https://github.com/ansible-community/ansible-test-gh-action/blob/main/action.yml#L483-L497
2022-12-09 15:22:41 +01:00
Laurent Indermuehle
f2c2173cfd
Add ansible-test integration inventory to .gitignore 2022-12-09 15:22:41 +01:00
Laurent Indermuehle
c895a86c2a
Add % instead of the default 'localhost' since we use remote connection
Previously, everything was on localhost. Now ansible-test is in a
venv and the db is in a container. The db see the IP address from the
podman host (10.88.0.2)
2022-12-09 15:22:41 +01:00
Laurent Indermuehle
8c5806848f
Add default file for root necessary since using venv instead of docker 2022-12-09 15:22:41 +01:00
Laurent Indermuehle
d781636f32
Add healthcheck to MariaDB before starting the tests
This prevent the first test to fail because the db isn't ready yet.
2022-12-09 15:22:40 +01:00
Laurent Indermuehle
5bd358e553
Add playbook to test connection to the server 2022-12-09 15:22:40 +01:00
Laurent Indermuehle
86188a20aa
Draft: Add a mariadb container 2022-12-09 15:22:40 +01:00
Andrew Klychkov
eade7ec1f0
CI: add PR change detection (#473) 2022-12-09 14:50:37 +01:00
Laurent Indermühle
015f58ea5a
Update CONTRIBUTORS 2022-12-08 19:32:22 +01:00
Diego Gullo
6ac89ca1f6
Display a more informative error when InvalidPrivsError is raised (#465) (#466)
* Display a more informative error when InvalidPrivsError is raised (Issue #465)

Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
2022-12-06 13:12:01 +01:00
Laurent Indermühle
4dac66382a
Add fixed version of Ubuntu (#470)
This is because ubuntu-latest link to ubuntu-22.04 which includes
cgroup-v2. I thinks our tests fails because of that. See
https://github.com/ansible-collections/news-for-maintainers/issues/28
for more information.
2022-12-06 08:41:04 +01:00
Andrew Klychkov
09e02320fd
README: Add matrix room + badge (#459)
* README: Add matrix room + badge

* improve
2022-11-01 12:59:06 +01:00
Gabriel PREDA
b9a6ec4f7d
* add socket option suggestion in documentation (#437)
* * add `socket` option suggestion in documentation

* white space fix

* * move first two at the end
2022-10-04 11:08:59 +02:00
Sviatoslav Sydorenko
8107530744
Sync GHA workflow w/ the collection template (#452)
* Sync GHA workflow w/ the collection template

* Drop the trailing pre-cmd semicolon

* Recover missing `-e` flag of `sed`

* Use relative paths for version configs

* Unquote `env.connector_version_file`

* Use string formatting to fix the substitution problem
2022-10-03 14:27:55 +02:00
Andrew Klychkov
b8e2c02e89
CI: add stable-2.14 to test matrix (#449) 2022-09-22 11:24:01 +02:00
R.Sicart
2cd29207f3
Fix: devel requires python 3.9 in roles CI (#444)
* Fix: devel requires python 3.9

Package 'ansible-core' requires a different Python: 3.8.13 not in '>=3.9'

* Exclude older version of Ansible when testing Python 3.9
2022-09-16 13:38:22 +02:00
Léo_chocolat
ff9f58e8d1
changelog: fix broken link in ansible docs (#446) 2022-09-16 09:15:29 +02:00
R.Sicart
7defd8e728
Release 3.5.1 commit (#443) 2022-09-09 15:22:00 +02:00
R.Sicart
2d75bc19b8
Fix privilege changing everytime (#438)
* Compare privileges from before and after manipulation

* Add unit tests

* Fix FIXME integration tests related to this issue

* Fix sanity check

* Fix assertion when appending privs in mysql_role_initial integration tests

* Fix pylint

* [ci-skip] Add changelog fragment

* Fix: missing fragment file extension

* Replace privileges_equal() by a comparison

* Fix: sanity pylint

* Fix: forgot to remove privileges_equal import from unit tests
2022-09-08 18:26:58 +02:00
Maxwell G
ea73d408c3
Combine REVIEW_CHECKLIST.md and CONTRIBUTING.md and fix links (#432) 2022-09-06 09:00:41 +02:00
Andrew Klychkov
3670b2adc6
Release 3.5.0 commit (#436) 2022-09-05 09:06:41 +02:00
R.Sicart
cc5cf98368
Fix: grant revoked priv (#434)
* Fix: exclude mysql 8 from test_mysql_user's 'Assert that priv did not change' test

* Add tests to verify that GRANT permission is present after user modification

* Fix: do not revoke GRANT permission when it's already allowed and present in priv parameter

* Deduplicate tests name

Easier to debug this way

* Fix assertions named 'GRANT permission is present'

* Only revoke grant option if it exists and absence is requested

* Fix assertion comments

* Fix: Only revoke grant option if it exists and absence is requested

* Avoid pointless revocations when ALL are granted

* Assert that priv did not change on mariadb also

* Fix: sanity and unity tests

* Format long lines

* Add changelog fragment

Co-authored-by: Laurent Indermühle <laurent.indermuehle@pm.me>
2022-09-02 13:40:06 +02:00
Андрей Неустроев
aef6a2040c
Add SOURCE_SSL_VERIFY_SERVER_CERT parameter (#435)
* Add SOURCE_SSL_VERIFY_SERVER_CERT parameter

* Rewiev fixs and add changelog fragment

* fix version

* Update changelogs/fragments/435-mysql_replication_verify_server_cert.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2022-09-02 10:59:51 +02:00