Bug 1224532 - NFS mount not working
Summary: NFS mount not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vagrant
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josef Stribny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-24 08:48 UTC by kushaldas@gmail.com
Modified: 2016-01-04 05:54 UTC (History)
7 users (show)

Fixed In Version: vagrant-1.7.2-8.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-13 19:07:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description kushaldas@gmail.com 2015-05-24 08:48:35 UTC
Following the official documentaion at [http://docs.vagrantup.com/v2/synced-folders/nfs.html]

While trying to do vagrant up:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/etc/init.d/rpcbind restart; /etc/init.d/nfs restart

Stdout from the command:



Stderr from the command:

bash: line 2: /etc/init.d/rpcbind: No such file or directory
bash: line 2: /etc/init.d/nfs: No such file or directory

Comment 1 Jakub Hrozek 2015-06-10 07:51:11 UTC
The offender is:
/usr/share/vagrant/plugins/guests/redhat/cap/nfs_client.rb

The code reads
 9             when :rhel_7
10               comm.sudo("/bin/systemctl restart rpcbind nfs")
11             else
12               comm.sudo("/etc/init.d/rpcbind restart; /etc/init.d/nfs restart")
13             end

Comment 2 Michael Adam 2015-06-10 07:58:35 UTC
I am also seeing issues with nfs shared folders.
But I think we need more details.

What exactly is the guest you are using?

I am having issues (with different messages) with
the fedora 22 cloud images as guest.

Comment 3 Jakub Hrozek 2015-06-10 08:11:17 UTC
vagrant up died with:

~~~~~~~~~~~~~~~~~~~~~~~~~~
==> server: Installing NFS client...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/etc/init.d/rpcbind restart; /etc/init.d/nfs restart

Stdout from the command:



Stderr from the command:

bash: line 2: /etc/init.d/rpcbind: No such file or directory
bash: line 2: /etc/init.d/nfs: No such file or directory
~~~~~~~~~~~~~~~~~~~~~~~~~~

I'm not sure if I've gotten to the bottom of my issues with NFS, though, but the above seems like a clear bug..

Comment 4 Michael Adam 2015-06-10 09:02:04 UTC
Jakub:

What's your guest (box)?

Comment 5 Jakub Hrozek 2015-06-10 09:19:02 UTC
Fedora-22.

I defined the guest as:

~~~~~~~~~~~~~~~~~
FREEIPA_SRC="/home/remote/jhrozek/devel/freeipa"

Vagrant.configure(2) do |config|
  config.vm.box = "fedora-22"
  config.vm.box_url = "http://download.fedoraproject.org/pub/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-22-20150521.x86_64.vagrant-libvirt.box"

  config.vm.define "server" do |server|
      server.vm.network "private_network", ip: "#{IP_ADDRESS}"
      server.vm.hostname = "#{HOSTNAME}"

      server.vm.synced_folder "#{FREEIPA_SRC}", "/freeipa", type: "nfs"

      server.vm.provider :libvirt do |domain|
          domain.memory = 1024
      end
  end                        
~~~~~~~~~~~~~~~~~

Comment 6 Michael Adam 2015-06-10 10:18:56 UTC
now that is strange - i use the same box and am not seeing this error msg. need to investigate...

Comment 7 Jakub Hrozek 2015-06-10 13:54:17 UTC
btw I'm using stock Fedora vagrant on a F-21 *host*, maybe that makes some difference?

I only checked the upstream baseline for vagrant is the same, the F-22 changelog only says;

~~~~~~~
* Thu May 21 2015 Josef Stribny <jstribny> - 1.7.2-6
- Fix: Support new Fedora releases
- Fix: Don't try to use biosdevname if it's not installed
~~~~~~~

I just fixed the nfs_client.rb file to call systemctl always since I don't use RHEL-6 or older with vagrant, so I'm pretty happy now. I saw some strangeness with the NFS mounts once where I had to start rpc-statd manually, but couldn't reproduce it again..

So this issue doesn't really block me in any way..

Comment 8 Michael Adam 2015-06-10 14:23:12 UTC
Ok. My host is f22 with vagrant distro packages and the same vagrant box image.
That may explain differences in behaviour.

But I don't quite see yet how you are running into the rhel other than 7 branch in the rhel guest code with fedora. Well ...

Comment 9 Josef Stribny 2015-06-22 16:32:44 UTC
The problem is that capabilities are inherited in this case from Red Hat's ones.
This should be fixed upstream by https://github.com/mitchellh/vagrant/commit/efd7b459dd999ef3177cb519d6beb809bb4e4d93.

Comment 10 Josef Stribny 2015-06-24 07:51:59 UTC
Taking.

Apparently the new capabilities merged are not enough. I already submitted the fix upstream[0] and I will prepare fixes for Fedora 21 and 22.


[0] https://github.com/mitchellh/vagrant/pull/5859

Comment 11 Jakub Hrozek 2015-06-24 08:20:20 UTC
(In reply to Josef Stribny from comment #10)
> Taking.
> 
> Apparently the new capabilities merged are not enough. I already submitted
> the fix upstream[0] and I will prepare fixes for Fedora 21 and 22.
> 
> 
> [0] https://github.com/mitchellh/vagrant/pull/5859

Thanks a lot, feel free to toss any test builds my way, I'll be glad to throw away mu current crude workarounds :)

Comment 12 Josef Stribny 2015-06-30 08:52:39 UTC
Jakub,

it seemed the my fix was fixing only a scenario when the nfs-utils package wasn't installed. I rewrote my patch to handle both scenarios[0]. Now I can truly do the builds! :)


[0] https://github.com/mitchellh/vagrant/pull/5880

Comment 13 Fedora Update System 2015-07-01 07:24:54 UTC
vagrant-1.7.2-8.fc21.1 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/vagrant-1.7.2-8.fc21.1

Comment 14 Fedora Update System 2015-07-01 07:25:01 UTC
vagrant-1.7.2-8.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/vagrant-1.7.2-8.fc22

Comment 15 Fedora Update System 2015-07-02 17:06:04 UTC
Package vagrant-1.7.2-8.fc21.1:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing vagrant-1.7.2-8.fc21.1'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10996/vagrant-1.7.2-8.fc21.1
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2015-07-13 19:07:52 UTC
vagrant-1.7.2-8.fc21.1 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2015-07-13 19:15:58 UTC
vagrant-1.7.2-8.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.