sgzijl / lvmconfig

Configure LVM with data from hiera
0 stars 1 forks source link

Query on nested mounts #1

Closed cbgermany closed 9 years ago

cbgermany commented 9 years ago

Hi, I have a query regarding the puppet code and wonder if you have experienced any issues with nested mounts and the order in which Puppet creates the directories on which they are mounted. if I have a Hiera that looks like the following:

lv_layout: "apps": vg: "vg01" fs: "ext4" mnt_point: "/opt/app" mnt_opts: "defaults" size: "100M" "software": vg: "vg01" fs: "ext4" mnt_point: "/opt/app/software" mnt_opts: "defaults" size: "200M"

The problem I appear to be running into is that the directory for /opt/app/software is being created before the mount of /opt/app. Then I get a puppet error when the mount for /opt/app/software fails because the directory does not exist. The issue I seem to have, is that the two Exec's to create the directories happens before the Mount statements. Rather than in the desired order of Exec (mkdir /opt/app) Mount (/opt/app) Exec (mkdir /opt/app/software) Mount (/opt/app/software) order.

Any thought on how to resolve would be greatly appreciated.

Chris

sgzijl commented 9 years ago

Hello @cbgermany

Thanks for filing this issue. What version of puppet are you using?

I am able to reproduce the problem with, at least, the latest puppet (3.7.1) on CentOS 6.

When switching from 'ordering = title-hash' to 'ordering = manifest' all seems to be fine, but that is not a proper solution. Eg: puppet apply --modulepath /root -e 'include lvmconfig' --noop --ordering manifest

I will look into this problem a bit more later this week. Feel free to contribute anything related to this issue.

cbgermany commented 9 years ago

Hi,

I'm really impressed that you got back so fast. The server I am using is running sles 11.3 and the puppet version is 3.4.3 (Puppet Enterprise 3.2.3).

Sent from my iPhone

On 23 Sep 2014, at 14:56, sgzijl notifications@github.com wrote:

Hello @cbgermany

Thanks for filing this issue. What version of puppet are you using?

I am able to reproduce the problem with, at least, the latest puppet (3.7.1) on CentOS 6.

When switching from 'ordering = title-hash' to 'ordering = manifest' all seems to be run fine, but that is not a proper solution. Eg: puppet apply --modulepath /root -e 'include lvmconfig' --noop --ordering manifest

I will look into this problem a bit more later this week. Feel free to contribute anything related to this issue.

— Reply to this email directly or view it on GitHub.

cbgermany commented 9 years ago

Hi

Just to confirm that adding --ordering manifest also resolves the issue on this version of puppet.

I have been puzzling this problem for a while so your response has put a small smile on my face.

Some other interesting information, I did not experience this issue on AIX. I have been modifying the puppet forge lvm module to fully support AIX as it"s only a partial implementation. Most of my testing has been there and I did not see the issue on that platform.

Sent from my iPhone

On 23 Sep 2014, at 17:44, Chris Germany chris.germany@blueyonder.co.uk wrote:

Hi,

I'm really impressed that you got back so fast. The server I am using is running sles 11.3 and the puppet version is 3.4.3 (Puppet Enterprise 3.2.3).

Sent from my iPhone

On 23 Sep 2014, at 14:56, sgzijl notifications@github.com wrote:

Hello @cbgermany

Thanks for filing this issue. What version of puppet are you using?

I am able to reproduce the problem with, at least, the latest puppet (3.7.1) on CentOS 6.

When switching from 'ordering = title-hash' to 'ordering = manifest' all seems to be run fine, but that is not a proper solution. Eg: puppet apply --modulepath /root -e 'include lvmconfig' --noop --ordering manifest

I will look into this problem a bit more later this week. Feel free to contribute anything related to this issue.

— Reply to this email directly or view it on GitHub.

sgzijl commented 9 years ago

I'm wondering what the default value for ordering is on AIX. Can you run the following command on an AIX server and return the output? puppet agent --configprint all |grep order

The PE documentation (https://docs.puppetlabs.com/pe/latest/puppet_modules_manifests.html#about-manifest-ordering) states that ordering = manifest is the default on PE. In the open source version it is title-hash (3.4.x to 3.7.x).

To fix the right way I think I have to ask some questions in the community and/or restructure the module. To be continued.

cbgermany commented 9 years ago

Hi

Just checked the default order for AIX and it is manifest.

Puppet version is 3.6.2 (Puppet Enterprise 3.3.0)

Sent from my iPhone

On 23 Sep 2014, at 19:46, sgzijl notifications@github.com wrote:

I'm wondering what the default value for ordering is on AIX. Can you run the following command on an AIX server and return the output? puppet agent --configprint all |grep order

The PE documentation (https://docs.puppetlabs.com/pe/latest/puppet_modules_manifests.html#about-manifest-ordering) states that ordering = manifest is the default on PE. In the open source version it is title-hash (3.4.x to 3.7.x).

To fix the right way I think I have to ask some questions in the community and/or restructure the module. To be continued.

— Reply to this email directly or view it on GitHub.

sgzijl commented 9 years ago

I think it's best to set ordering to manifest everywhere, as the PE documentation states that should be the default.

On the puppet master, edit the puppet.conf agent section and set ordering to manifest, eg:

[agent]
    ordering = manifest
    enviroment = production
    ...
    ...

Reload the puppet master service to activate the change. Because the master compiles the catalog, I think this will solve the nested mount issue on all agents to, as long as you define the right order in hiera. When you run puppet without a master, make sure to set ordering to manifest on the agent side as well.

This seems to be the best solution for now. If this works for you, I'll close the issue.

cbgermany commented 9 years ago

Many thanks for your assistance on this issue, it's been really appreciated.

Chris

Sent from my iPhone

On 24 Sep 2014, at 13:10, Siert notifications@github.com wrote:

I think it's best to set ordering to manifest everywhere, as the PE documentation states that should be the default.

On the puppet master, edit the puppet.conf agent section and set ordering to manifest, eg:

[agent] ordering = manifest enviroment = production ... ... Reload the puppet master service to activate the change. Because the master compiles the catalog, I think this will solve the nested mount issue on all agents to, as long as you define the right order in hiera. When you run puppet without a master, make sure to set ordering to manifest on the agent side as well.

This seems to be the best solution for now. If this works for you, I'll close the issue.

— Reply to this email directly or view it on GitHub.

sgzijl commented 9 years ago

you're welcome.