rightscale-cookbooks / ephemeral_lvm

Configures available ephemeral devices on a cloud server
http://community.opscode.com/cookbooks/ephemeral_lvm
Other
13 stars 16 forks source link

fstab merge vs overwrite on defaults #47

Open shaiguitar opened 8 years ago

shaiguitar commented 8 years ago

Due to https://github.com/rightscale-cookbooks/ephemeral_lvm/blob/333581c2b7c9b4b25d3c3359891aa2f7754e54a1/attributes/default.rb#L29-L32 the cookbook will just merge the chef attributes set and not overwrite them. For example, with:

    "ephemeral_lvm": {
      "mount_point": "/mnt/mongodb",
      "mount_point_properties": { "options": ["defaults", "noatime","auto"], "paas": 0 }
    }

The end result fstab will be:

/dev/mapper/vg--data-ephemeral0 /mnt/mongodb ext4 defaults,noauto,noatime,auto 0 0

instead of having just the auto (and not both merged on top of each other). Is this intended behavior and/or something to do to fix?

rshade commented 7 years ago

looking at this, it's definitely intentional: https://github.com/rightscale-cookbooks/ephemeral_lvm/blob/master/recipes/default.rb#L69