Fix mysql_access duplicate declaration

Bug #1618607 reported by Dmitry Ilyin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Medium
Dmitry Ilyin
Mitaka
Confirmed
Medium
Dmitry Ilyin

Bug Description

deployment/puppet/osnailyfacter/manifests/mysql_access.pp

# ensure_resource(file, $default_file_path)

This ensure is here to create the File resource for the default .my.cnf config if it's not present
so the collector
   File <| title == $default_file_path |> {
      ensure => 'symlink',
      content => undef,
      path => $default_file_path,
      target => $host_file_path,
    }
would be able to set it to be a symlink to the current custom database config file.

This ensure may be needed in case of an external database setup when the mysql server and it's
my.cnf management class is not applied on the controller. But with the normal deployment
this ensure creates a duplicate declaration if the mysq server class evaluates after this ensure have already been evaluated. There is no reliable control of the evaluation order so it's pure luck which one will evaluate first and if the catalog will break or not.

The proper solution would be to move the my.cnf management to a separate class and include it on both sides so there will be no duplicates or, at least, wrap both sides into the !defined as a dirty hack, but both solutions will requires committing to the upstream mysql module.

I'll start this process but it will take time.

Tags: area-library
Dmitry Ilyin (idv1985)
Changed in fuel:
assignee: nobody → Dmitry Ilyin (idv1985)
milestone: none → 9.1
status: New → Confirmed
Changed in fuel:
milestone: 9.1 → 10.0
importance: Undecided → High
tags: added: area-library
Dmitry Ilyin (idv1985)
Changed in fuel:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (master)

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

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

Reviewed: https://review.openstack.org/365788
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=eb29d313ef99a3ab65d2847f7cd102e4644b0ce4
Submitter: Jenkins
Branch: master

commit eb29d313ef99a3ab65d2847f7cd102e4644b0ce4
Author: Maksim Malchuk <email address hidden>
Date: Tue Sep 6 00:28:53 2016 +0300

    Ensure .my.cnf exists even if mysql is disabled

    Change-Id: I611e721fff8f7c9c0ce5d234132b6bb1c6f219a1
    Closes-Bug: #1620410
    Related-Bug: #1618607
    Signed-off-by: Maksim Malchuk <email address hidden>

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.