redeployment fails because of recreating user nova in mysql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Fuel for OpenStack |
Medium
|
Alexey Deryugin |
Bug Description
{"build_id": "165", "build_number": "165", "release_versions": {"2015.1.0-7.0": {"VERSION": {"build_id": "165", "build_number": "165", "api": "1.0", "fuel-library_sha": "5d50055aeca1dd
I'm deploying MOS 7.0 with local ubuntu mirror. If some ubuntu packages are absent deployment fails.
After redeployment we get puppet error because manifest are trying to create user nova in mysql whereas this user was already created. It looks like manifest aren't idempotent .
It's commercial deployment and I can't provide you with diagnostic snapshot because of customers security rules.
That's the error from puppet log:
2016-01-23 01:47:50 +0000 Puppet (err): Execution of '/usr/bin/mysql --defaults-
2016-01-23 01:47:50 +0000 /Stage[
2016-01-23 01:48:12 +0000 Puppet (err): Execution of '/usr/bin/mysql --defaults-
2016-01-23 01:48:12 +0000 /Stage[
2016-01-23 01:48:32 +0000 Puppet (err): Execution of '/usr/bin/mysql --defaults-
2016-01-23 01:48:32 +0000 /Stage[
Ivan Ponomarev (ivanzipfer) wrote : | #1 |
Changed in fuel: | |
assignee: | nobody → Fuel Library Team (fuel-library) |
tags: | added: area-library |
tags: | added: customer-found |
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
importance: | Undecided → Medium |
Gleb (gleb-q) wrote : Re: [Bug 1537325] Re: redeployment fails because of recreating user nova in mysql | #2 |
Our deployment failed because of packages libnss3-tools and
libapache2-
Probably you don't need to reproduce, just check manifests that creates
user nova. It tries to create new user even it already exists.
On Mon, Jan 25, 2016 at 9:48 PM, Ivan Ponomarev <email address hidden>
wrote:
> Can you provide the purged packages that we have step to reproduce
>
> ** Changed in: fuel
> Assignee: (unassigned) => Fuel Library Team (fuel-library)
>
> ** Tags added: area-library
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> redeployment fails because of recreating user nova in mysql
>
> Status in Fuel for OpenStack:
> Confirmed
>
> Bug description:
> {"build_id": "165", "build_number": "165", "release_versions":
> {"2015.1.0-7.0": {"VERSION": {"build_id": "165", "build_number":
> "165", "api": "1.0", "fuel-library_sha":
> "5d50055aeca1dd
> "4162b0c15adb42
> ["experimental"], "fuel-nailgun-
> "d7027952870a35
> "2015.1.0-7.0", "fuel-agent_sha":
> "50e90af6e3d560
> "python-
> "astute_sha": "6c5b73f93e24cc
> ostf_sha": "2cd967dccd66cf
> "7.0", "fuelmain_sha": "a65d453215edb0
> "auth_required": true, "api": "1.0", "fuel-library_sha":
> "5d50055aeca1dd
> "4162b0c15adb42
> ["experimental"], "fuel-nailgun-
> "d7027952870a35
> "2015.1.0-7.0", "fuel-agent_sha":
> "50e90af6e3d560
> "python-
> "astute_sha": "6c5b73f93e24cc
> ostf_sha": "2cd967dccd66cf
> "7.0", "fuelmain_sha": "a65d453215edb0
>
>
> I'm deploying MOS 7.0 with local ubuntu mirror. If some ubuntu packages
> are absent deployment fails.
>
> After redeployment we get puppet error because manifest are trying to
> create user nova in mysql whereas this user was already created. It
> looks like manifest aren't idempotent .
>
> It's commercial deployment and I can't provide you with diagnostic
> snapshot because of customers security rules.
>
>
> That's the error from puppet log:
>
> 2016-01-23 01:47:50 +0000 Puppet (err): Execution of '/usr/bin/mysql
> --defaults-
> identified by PASSWORD '*CD404B6942DAB
> returned 1: ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for
> 'nova'@
> 2016-01-23 01:47:50 +0000
> /Stage[
Changed in fuel: | |
milestone: | none → 9.0 |
Michael Polenchuk (mpolenchuk) wrote : | #3 |
not affected version 8.x+
Changed in fuel: | |
milestone: | 9.0 → 7.0-updates |
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → Julia Varlamova (jvarlamova) |
Julia Varlamova (jvarlamova) wrote : | #4 |
Unfortunately, I was unable to reproduce this bug in MOS 7.0 deployment (Ubuntu). When applying the manifest which creates user 'nova' in debug mode we can see that it checks if user 'nova' already exists before creation. It means that this manifest is idempotent. For now this bug seems to me to be invalid, but maybe I'm wrong? Maybe someone was able to reproduce this bug?
seroron (seroron) wrote : | #5 |
I reproduced this bug in both MOS 7.0 and MOS 8.0 deployment (Ubuntu).
The following is MOS 8.0 log.
=======
2016-03-06 01:50:40 ERR (/Stage[
2016-03-06 01:50:40 ERR /usr/bin/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50:40 ERR /usr/lib/
2016-03-06 01:50...
Changed in fuel: | |
assignee: | Julia Varlamova (jvarlamova) → nobody |
Changed in fuel: | |
assignee: | nobody → Fuel Library Team (fuel-library) |
Max Stepanov (t-max-z) wrote : | #6 |
Puppet resource is not idempotent. This bug is due to incorrect checking if user is already created.
Both those cases happened because hostname contains uppercase characters. When "CREATE USER" query is processed by MySQL hostname will be converted to lower case. But when puppet checks if user was already created it uses query like so:
select '1' from user where CONCAT(user, '@', host) = 'cinder@HOSTNAME1';
Obviously it will not match the existing records. So puppet tries to create a "new" user and fails because mysql will convert the hostname to lower case and there is already a record like that.
Temporary solution is to avoid upper case letters in hostname for nodes.
Changed in fuel: | |
assignee: | Fuel Library Team (fuel-library) → MOS Puppet Team (mos-puppet) |
tags: |
added: area-mos removed: area-library |
Changed in fuel: | |
assignee: | MOS Puppet Team (mos-puppet) → Alexey Deryugin (velovec) |
Fix proposed to branch: stable/7.0
Review: https:/
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to puppet-modules/puppet-openstacklib (mos-8.0) | #8 |
Fix proposed to branch: mos-8.0
Change author: Alexey Deryugin <email address hidden>
Review: https:/
Changed in fuel: | |
status: | Confirmed → In Progress |
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to puppet-modules/puppet-openstacklib (mos-8.0) | #9 |
Reviewed: https:/
Submitter: Ivan Berezovskiy <email address hidden>
Branch: mos-8.0
Commit: 2b094fc75255a4b
Author: Alexey Deryugin <email address hidden>
Date: Tue Jul 5 11:20:35 2016
Downcase all hostnames for MySQL user/db creation
Mysql puppet providers apply downcase method for hostnames, that
lead us to errors when we use hostnames with upper-case letters.
Change-Id: Ic1d73a3d5282ac
Closes-Bug: #1537325
Changed in fuel: | |
status: | In Progress → Fix Committed |
Change abandoned by Alexey Deryugin (<email address hidden>) on branch: stable/7.0
Review: https:/
Can you provide the purged packages that we have step to reproduce