Issue #6309 has been updated by Charlie Sharpsteen.

Keywords set to  customer

----------------------------------------
Bug #6309: Mount type should check mount state as well as fstab
https://projects.puppetlabs.com/issues/6309#change-88707

* Author: Zach Leslie
* Status: Closed
* Priority: High
* Assignee: 
* Category: mount
* Target version: 2.6.x
* Affected Puppet version: 0.25.5
* Keywords:  customer
* Branch: 
----------------------------------------
When changing the manifest for a mount resource, puppet only checks to see if 
fstab is out of sync, and does not actually check the mount status to verify 
that its state is what the manifest says it should be.  Affected versions are 
0.25.5-2.6.4.

Steps to reproduce the issue:

1. mount a nfs filesystem on a host. 
2. generate a mount manifest with ralsh mount /mnt, write it to a file (See [1] 
Output) 
3. pick a different server which should export to the same mountpoint, change 
the manifest device=> attribute to it 
4. cd a login shell into the mountpoint (so 'umount /mnt' fails with mount 
point busy) 
5. run the manifest once. puppet detects the change (because fstab is out of 
sync with the manifest), changes fstab and attempts to sync the mountpoint but 
cannot (see [5] output) 
6. run the manifest again 'n' times. puppet never re-attempts the mount due to 
the mounted? method returning OK. (See [6] Ouput). This is the error. Puppet 
should detect that not only is the *fstab* out of sync with the manifest, but 
*the actual mounted filesystem* is also out of sync.

<pre>
[1] Output 
[user@srv01 ~]$ ralsh mount /opt/mnt 
mount { '/opt/mnt': 
pass => '0', 
device => 'filer01:/vol/vol01', 
ensure => 'mounted', 
options => 'rw,hard,proto=tcp', 
dump => '0', 
target => '/etc/fstab', 
fstype => 'nfs' 
}

[2] Output - note I changed '01' to '02' (these are the ids of two of our 
integration environments) 
[user@srv01 /opt/mnt/etc]$ cat ~user/mount.pp 
mount { '/opt/mnt': 
pass => '0', 
device => 'store02:/vol/vol02', 
ensure => 'mounted', 
options => 'rw,hard,proto=tcp', 
dump => '0', 
target => '/etc/fstab', 
fstype => 'nfs' 
}

[5] Output

notice: //Mount[/opt/mnt]/device: device changed 'store01:/vol/vol01' to 
'store02:/vol/vol02' 
debug: Flushing mount provider target /etc/fstab 
debug: Finishing transaction 23456250360860 with 0 changes 
info: Filebucket[/var/lib/puppet/clientbucket]: Adding 
/etc/fstab(9531774952409006d66ceb78097023) 
notice: //Mount[/opt/mnt]: Refreshing self 
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount' 
info: Mount[/opt/mnt](provider=parsed): Remounting 
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/umount /opt/mnt' 
err: //Mount[/opt/mnt]: Failed to call refresh on Mount[/opt/mnt]: Execution of 
'/bin/umount /opt/mnt' returned 1: umount: /opt/mnt: device is busy 
umount: /opt/mnt: device is busy

[6] Output

debug: Prefetching parsed resources for mount 
info: Applying configuration version '1297711427' 
debug: Puppet::Type::Mount::ProviderParsed: Executing '/bin/mount' 
debug: Finishing transaction 23456250586940 with 0 changes

</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to