mysql_init_tasks throws ERROR 1045 on containerized undercloud, when doing consequent re-deployments

Bug #1698349 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

Containerized undercloud deployed by quickstart throws "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)" from a mysql-init-tasks container, when doing consequent re-deployments.

Consequent re-deployment should be idempotent or deploy updated configuration in-place. That can't be done though and requires a full /var/lib/mysql wiped undercloud.

The fix is probably to not update mysql password if the stack for it is deployed and mysql service container is alive undercloud.

Changed in tripleo:
importance: Undecided → Medium
milestone: none → pike-3
status: New → Triaged
tags: added: containers
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/474945

Changed in tripleo:
assignee: nobody → Bogdan Dobrelya (bogdando)
status: Triaged → In Progress
description: updated
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

The .my.cnf file is in place, the issue is that the command /usr/bin/mysql --defaults-extra-file=/root/.my.cnf -NBe SELECT 1; throws "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)" from a container

Changed in tripleo:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (master)

Change abandoned by Bogdan Dobrelya (<email address hidden>) on branch: master
Review: https://review.openstack.org/474945

Revision history for this message
Bogdan Dobrelya (bogdando) wrote : Re: mysql_init_tasks does not always provide .my.cnf

Just have caught the same ERROR 1045 with queens' master undercloud containers. That's weird a bug...

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

For that case, it seems related to the missing /etc/hosts entry. I need to inspect my CloudDomain / CloudName / overcloud_domain_name setup perhaps.

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
description: updated
summary: - mysql_init_tasks does not always provide .my.cnf
+ mysql_init_tasks throws ERROR 1045 on containerized undercloud
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-quickstart-extras (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/522266

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-tripleoclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/522298

description: updated
Changed in tripleo:
status: Invalid → Incomplete
Revision history for this message
Bogdan Dobrelya (bogdando) wrote : Re: mysql_init_tasks throws ERROR 1045 on containerized undercloud

So the issue is that for a consequent redeployments of containerized underlcloud, the existing /var/lib/mysql host's dir prevents mysql_bootstrap init container to update root passwords (generated each time we do undercloud deploy). So this basically is the root cause. Removing the directory helped to fix error for consequent re-deployments.

summary: - mysql_init_tasks throws ERROR 1045 on containerized undercloud
+ mysql_init_tasks throws ERROR 1045 on containerized undercloud, when
+ doing consequent re-deployments
Changed in tripleo:
status: Incomplete → Won't Fix
tags: added: ux
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart-extras (master)

Change abandoned by Bogdan Dobrelya (<email address hidden>) on branch: master
Review: https://review.openstack.org/522266
Reason: at first, I was thinking to allow custom undercloud endpoints starting from t-h-t, then quickstart, and the client as well... But that's too much of the things to start with. So I reworked a baby step as an autonomous client option, that just heals the hardcode in the client. Hopefully, we'll end up having those Cloud* for uncercloud in t-h-t and quickstart params as well, eventually!
   4:58:28 PM GMT+1 - bogdando: at least, this little change unblocks me with RDO cloud domain names != defaults :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/522298
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=909a9f753007f4cb10fc36a45934cccd6ce753cf
Submitter: Zuul
Branch: master

commit 909a9f753007f4cb10fc36a45934cccd6ce753cf
Author: Bogdan Dobrelya <email address hidden>
Date: Wed Nov 22 17:41:08 2017 +0100

    Allow to override t-h-t 'Cloud*' params undercloud

    Allow to parametrize the hardcoded 'undercloud' domain name.
    F.e. RDOcloud uses an 'rdocloud' domain, therefore some DNS things might be
    failing with the hardcoded value.
    The default domain name remains unchanged. It can be
    overriden with a new '--local-domain' option as well.

    Related-bug: #1698349
    Partial-bug: #1733873

    Change-Id: Iad63142b241f9f7f0bbef68473f18b69f36daf76
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Basically that is a valid bug, reopening. Consequent re-deployment should be idempotent or deploy updated configuration in-place. That can't be done though and requires a full /var/lib/mysql wiped undercloud.

Changed in tripleo:
importance: Medium → High
status: Won't Fix → Triaged
tags: removed: ux
tags: added: idempotency
Changed in tripleo:
milestone: pike-3 → queens-2
assignee: Bogdan Dobrelya (bogdando) → nobody
description: updated
tags: added: pike-backport-potential
Changed in tripleo:
milestone: queens-2 → queens-3
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :
Changed in tripleo:
assignee: nobody → Emilien Macchi (emilienm)
status: Triaged → Fix Committed
Changed in tripleo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.