minishift / minishift-centos-iso

CentOS based ISO as an alternative for boot2docker ISO
GNU Lesser General Public License v3.0
40 stars 33 forks source link

Fix #98 Add cifs-utils for mounting smb shares #99

Closed gbraad closed 7 years ago

gbraad commented 7 years ago

This addresses #98

gbraad commented 7 years ago

Issue on centos-ci:

/root/payload/tests/../build/bin/minishift start --vm-driver kvm --iso-url file:///root/payload/tests/../build/minishift-centos7.iso

Local test build image, runs and can mount cifs:

[docker@minishift ~]$ sudo su -
[root@minishift ~]# mount -t cifs //10.0.21.33/disks /media/disks
Password for root@//10.0.21.33/disks:  ********
[root@minishift ~]# mount
<snip />
//10.0.21.33/disks on /media/disks type cifs (rw,relatime,vers=1.0,cache=strict,username=root,domain=GBRAADNL,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.21.33,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1)
[root@minishift ~]# ls -al /media/disks/
total 1028
drwxr-xr-x. 3 root root    0 Jan 19 07:53 .
drwxr-xr-x. 3 root root 4096 Feb  7 03:30 ..
drwxrwxrwx. 1 root root    0 Dec 20 22:30 sda1
<snip />
gbraad commented 7 years ago

retest this please

hferentschik commented 7 years ago

@gbraad any chance we can add some form of sanity check? Something which would at least verify the right tools are installed on the ISO? I guess it would be hard to test an actual mount, since this would require a samba share to be available? WDYT?

gbraad commented 7 years ago

@hferentschik mounting without the cifs-utils should return mount: wrong fs type... and when installed it will ask for the password (as shown). Only after return it will actually contact a server: timeout or succeed (non-error return code).

Not familiar to advocado, but I assume we can test this somehow.

hferentschik commented 7 years ago

Not familiar to advocado,

Not me either, but looking at the existing tests, it is just wrapping around system commands to minishift. Should be easy enough to extend/add

hferentschik commented 7 years ago

btw, we need to make sure that the b2d image gets the required utils as well.

gbraad commented 7 years ago

at the moment have not been able to look into this due to the critical bug, but likely we need to compile these components

hferentschik commented 7 years ago

@gbraad shall we go ahead and merge w/o test? Or are you planning add something? Eventually we should add tests the same way as in minishift as well, but for this change we might just go without.

I wonder whether it would be worth switching to something like serverspec. I think it would maybe be a better fit for us. On the other hand, nothing wrong with Advocado provided we eventually get the tests working on other OS types as well.

gbraad commented 7 years ago

serverspec

+1

hferentschik commented 7 years ago

We used server-spec in one of our early Vagrant setups - https://github.com/redhat-developer-tooling/openshift-vagrant/tree/master/cdk-v2/tests

It was a good fit. Not perfect, but good enough.

hferentschik commented 7 years ago

Merged, thanks.

coolbrg commented 7 years ago

I am also able to mount my host home folder inside minishift VM :+1: