kitchen not cooking drax mounts
Closed, ResolvedPublic

Description

drax has mounts set up that are not being provisioned by the pangea kitchen. they need to be provisioned by a cookbook or something.

sitter created this task.Mar 1 2017, 3:47 PM
sitter moved this task from Backlog to Ready To Do on the Neon board.

added to pangea-kitchen site-cookbooks/jenkins-master/recipes/default.rb

jriddell moved this task from Ready To Do to Review on the Neon board.Mar 2 2017, 5:24 PM
garg added a subscriber: garg.Mar 3 2017, 11:19 AM

This looks inconsistent, why is one a link and the other a folder?

Not to mention that the commit doesn't add the relevant fstab entries.

garg added a comment.Mar 3 2017, 11:32 AM

You also changed it in the jenkins master cookbook, which might or might not be relevant for other jenkins masters

garg added a comment.Mar 3 2017, 11:45 AM

Why not simply mount the device to the relevant folder instead of having another level of indirection ?

sitter moved this task from Review to Doing on the Neon board.EditedMar 6 2017, 6:43 AM
  • merge the two mount blocks into one with action list [:enable, :mount] to both add it to the fstab and enable it in one go.
  • address the device by-id /dev/disk/by-id/scsi-0DO_Volume_volume-neon-jenkins instead of device enumeration, addressing it as sdX is super unreliable as sdX can be literally anything if one were to add more volumes
  • missing set up for /mnt/volume-neon-jenkins/workspace on /var/lib/jenkins/workspace type none (rw,bind)
  • missing directory creation for mount resulting in error when cooking from scratch ==> default: Mount point /mnt/volume-neon-jenkins does not exist

(it's interesting how /dev/sda is a partition on that volume...)

genaxxx added a subscriber: genaxxx.Mar 6 2017, 7:22 AM

done
Not sure what you mean by " missing set up for /mnt/volume-neon-jenkins/workspace on /var/lib/jenkins/workspace type none (rw,bind)" that was already there

sitter added a comment.EditedMar 8 2017, 3:03 PM
  • doesn't format the disk if it is unformatted
  • probably should just mount as jenkins? otherwise jenkins has a hard time creating stuff on its own ultimately meaning that everything we ever want to put in there needs to have the cookbook adjusted to do so

filesystem module formats it?
I don't know about mounting as a user, I don't see support for it in https://docs.chef.io/resource_mount.html, seems fine to have a directory owned by the user

filesystem module formats it?

Does it? Does it really?

[Mittwoch, 8. März 2017] [16:59:48 CET] <Riddell> sitter: further errors https://paste.kde.org/pt9zhwlhd
[Mittwoch, 8. März 2017] [17:00:11 CET] <sitter> Riddell: well those are in the cookbook
[Mittwoch, 8. März 2017] [17:00:26 CET] <sitter> ==> default: [execute] /dev/disk/by-id/scsi-0DO_Volume_volume-neon-jenkins is not a block special device.
[Mittwoch, 8. März 2017] [17:00:26 CET] <sitter> ==> default: Proceed anyway? (y,n)
[Mittwoch, 8. März 2017] [17:01:12 CET] <sitter> to quote myself "(it's interesting how /dev/sda is a partition on that volume...)"
[Mittwoch, 8. März 2017] [17:01:45 CET] <sitter> Riddell: probably needs some force flag or something

I don't know about mounting as a user, I don't see support for it in https://docs.chef.io/resource_mount.html, seems fine to have a directory owned by the user

from https://docs.chef.io/resource_mount.html

options
Ruby Types: Array, String

An array or string that contains mount options. If this value is a string, it is converted to an array. Default value: defaults.

DO's own instructions also tell us to mount with discard

# Create a mount point under /mnt
$ sudo mkdir -p /mnt/volume-neon-jenkins

# Mount the volume
$ sudo mount -o discard,defaults /dev/disk/by-id/scsi-0DO_Volume_volume-neon-jenkins /mnt/volume-neon-jenkins

# Change fstab so the volume will be mounted after a reboot
$ echo '/dev/disk/by-id/scsi-0DO_Volume_volume-neon-jenkins /mnt/volume-neon-jenkins ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab

added discard
sorry your pastebin got deleted
running Vagrant up now I get

> default: GPG error: http://repo.zabbix.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D13D58E479EA5ED4

> default: Error executing action install on resource 'apt_package[Install Zabbix Agent]'

now in site-cookbooks/nci-disk/recipes/default.rb

but I still can't get vagrant to do the right thing

jriddell moved this task from Doing to Review on the Neon board.Jun 16 2017, 10:26 AM
bshah closed this task as Resolved.Jul 17 2018, 4:40 AM

There is disk cookbook in kitchen now. so closing this.