-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[go.mod]Bump from v0.3.0 to pseudoversion #660
[go.mod]Bump from v0.3.0 to pseudoversion #660
Conversation
/test functional |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/7b16f76656fd4211ab0f031e50f3bbd5 ✔️ nova-operator-content-provider SUCCESS in 1h 22m 41s |
so this seams to be breakign how we use the db |
|
Suspecting openstack-k8s-operators/mariadb-operator#172 |
Wrong suspicion. But. The current openstack-operator is using mariadb-operator openstack-k8s-operators/mariadb-operator@6fb96fd The mariadb-operator has a fix for that (adding omitempty ) in So I will try to bump the mariadb in openstack-operator to 4d759dd283b312905366b45f0d93059334738b2c and then bump the service operators to 4d759dd283b312905366b45f0d93059334738b2c as well to see if that helps. |
82924f5
to
5051883
Compare
I ended up bumping mariadb here to 331c633c453c as in the meantime openstack-operator bumped to it too. Locally with an openstack operator build (OPENSTACK_IMG=quay.io/gibi/openstack-operator-index:v0.0.380 make openstack) using this PR was able to successfully do DB creation from nova. But
|
5051883
to
c274999
Compare
added RBAC for MariaDBAccount and now I'm getting
This is because mariadb-operator uses the passed in database user name as the name of the MariaDB account. Our samples uses nova_cell0 (nova_<cell_mame>) as db user name by default and we use underscore in it as mariadb itself allows underscore in the user name. However k8s does not allow underscore in the resource names. So I manually edited the OpenStackControlPlane CR to use db users as novaapi, novacell0, novacell1 and this triggered MariaDBAccount creation. But then db sync failed with error:
And this is probably due the another change in behavior. Mariadb in the past used the database schema name as the user. But not any more. |
c274999
to
f0c299f
Compare
so I changed nova to use the schema name and the user name separately. With these changes (+ manually editing the OpenStackControlPlane CR to avoid underscore in the username) nova control plane can be deployed now |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/ba9bb4bc694e4e9ca5f375286217645b ✔️ nova-operator-content-provider SUCCESS in 1h 24m 05s |
Right, so I had assumed that changing nothing in the downstream operators, they would still send Database{} using the same string for the database name and the username, where username was previously ignored. however, you have a username that has an underscore in it, and then due to this: I'm using that same name as the name of the mariadbaccount and that's being rejected. would we accept as an interim solution to apply a simple search and replace of underscore to dash in mariadb-operator in that section when it comes up with the metadata name? |
That is one way to fix it. The other is that I can change the nova-operator user defaults not to use special characters. I think other operators has one schema per operator and they use simple names like glance or placement for both the schema name and the user name. So this only affect nova-operator and I anyhow need to change the nova operator to adapt. |
f0c299f
to
a400d45
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/9ab2be8d9bce4c268f0635c627cd7dce ✔️ nova-operator-content-provider SUCCESS in 1h 23m 57s |
a400d45
to
ae76f9c
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/3c0f9dce520345a7bfe31e72cf8d5a17 ✔️ nova-operator-content-provider SUCCESS in 2h 03m 56s |
whether or not you do that, I think mariadb-operators logic here definitely should accommodate this, mariadb identifiers with underscores in them are very common. since the Database helper is generating a name for the CR automatically it should absolutely be using k8s-compliant names when it does so. similar logic is already in the operator here: https://github.com/openstack-k8s-operators/mariadb-operator/blob/331c633c453c493a80c315289137b08fc9601ba0/pkg/mariadb/database.go#L88 |
Currently such translation is used from the db schema name to the MariaDBDatabase. As far as I know all our db schema names are coming from the service operator implementation and not from the user. So there it is less likely that two names will clash due to translated to the same name by the mariadb-operator. If at the end the DB user name will also come from some generation sw then I'm fine to have the translation in the mariadb-operator. But if it can come from the user then I would rather make a restriction on the usable characters of the username field. |
tempest passed so the adaptation seems to work OK.
|
ae76f9c
to
0e051b3
Compare
Bumped to openstack-k8s-operators/mariadb-operator@5ad30f7 so the underscore in the user names are OK again. |
871d6fb
to
94c1c6e
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/190aa60ff1ab419ab0acd2c27055e09f ✔️ nova-operator-content-provider SUCCESS in 1h 44m 01s |
94c1c6e
to
226c8da
Compare
We still need a fix in mariadb-operator for the finalizer handling. Currently GetDatabaseByName() cannot be used to load the MairaDBAccount and DeleteFinalizer does not remove the finalizer from the MariaDBAccount. |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/9829bc9c60b14237b9bfa239f82523b0 ✔️ nova-operator-content-provider SUCCESS in 2h 25m 25s |
226c8da
to
b9d385d
Compare
b9d385d
to
73d87d1
Compare
I expect a green CI run on this now |
/test functional
|
73d87d1
to
6cab55f
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/d67cb93de0f645fdbb8f5dcb4eaa23c3 ✔️ nova-operator-content-provider SUCCESS in 2h 18m 07s |
Our intention is to track service operator and lib-common dependencies via pseudoversions. However renovate does not automatically bump from a tagged version (e.g. v0.3.0) to a newer but not tagged pseudoversion. So this patch does the manual bump. After this renovate will bump the newer pseduoversions. Adapt to the new version by: * adding RBAC rules for MariaDBAccount manipulation * adding Own(MariaDBAccount) to detect status changes * separating DB user name and schema name * adapting test to simulate MariaDBAccount success * adapting the tests to the interim changes of mariadb TLS
6cab55f
to
7246fb6
Compare
adapted the kuttl test as well to the fqdn mariadb hostnames now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gibizer, mrkisaolamb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3d7d9da
into
openstack-k8s-operators:main
Our intention is to track service operator and lib-common dependencies
via pseudoversions. However renovate does not automatically bump from a
tagged version (e.g. v0.3.0) to a newer but not tagged pseudoversion. So
this patch does the manual bump. After this renovate will bump the newer
pseduoversions.
Adapt to the new version by: