Does zypper support NFSv4?

Is it possible to add repositories from NFSv4 to zypper? I have initiated automatic mounting network resources on NFSv4 and it works fine, but after adding repository from NFSv4 to zypper, I have problem on refreshing repository data:

omega:/distrib/repositories/1 # zypper refresh repo-update-1
Retrieving repository 'repo-update-1' metadata \]
Failed to mount omega:/distrib/repositories/update/11.3 on /var/adm/mount/AP_0x00000001: Unable to verify that the media was mounted

Abort, retry, ignore? [a/r/i/?] (a): 
Failed to mount omega:/distrib/repositories/update/11.3 on /var/adm/mount/AP_0x00000001: Unable to verify that the media was mounted

Abort, retry, ignore? [a/r/i/?] (a): 
Retrieving repository 'repo-update-1' metadata [error]
Repository 'repo-update-1' is invalid.
Failed to mount omega:/distrib/repositories/update/11.3 on /var/adm/mount/AP_0x00000001: Unable to verify that the media was mounted

Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'repo-update-1' because of the above error.
Could not refresh the repositories because of errors.
omega:/distrib/repositories/1 # zypper lr -u repo-update-1
Alias          : repo-update-1                                
Name           : repo-update-1                                
URI            : nfs4://omega/distrib/repositories/update/11.3
Enabled        : Yes                                          
Priority       : 99                                           
Auto-refresh   : Off                                          
Keep Packages  : Off                                          
Type           : NONE                                         
GPG Check      : On                                           
GPG Key URI    :                                              
Path Prefix    :                                              
Parent Service :                                              
MD Cache Path  : /var/cache/zypp/raw/repo-update-1            

As I would expect (as you) that it does not matter who wants to open a file to trigger the mounting, I do not see what would be special in zypper that the mounring fails there.

A few questions:
. Is var/adm/mount/AP_0x00000001 the mount point that should be used?
. What if you force the mount first by opening some file there and then starting zypper?

are you using SLED or SLES 11?


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

What if there were no hypothetical questions?

Did you find a solution to your problem? I am experience this as well. Both Desktops are openSUSE 12.2 and I am using NFS4 on the Desktop that hosts the repository export.

On 03/08/2013 12:16 AM, alvinbeach wrote:
> Did you find a solution to your problem?

if you never get an answer from the OP you might consider beginning
your own thread with all the symptoms/software/hardware/etc…but, it
think it probably should go into the networking forum …

well, i don’t know if it is a networking or zypper problem…

you might hope a zypper or NFS guru comes through here and tells us both.


dd

This is definitely a zypper (or libzypp) related problem. I can manually mount that NFS export (and others) just fine. So there is nothing wrong with nfs from the side of the client (mount) and server side. I suspect more that this is an issue with nfs4 support in zypper. I will wait a little bit longer before I create a new thread, just in case the OP responds with a solution.

On 2013-03-08 16:06, alvinbeach wrote:
>
> This is definitely a zypper (or libzypp) related problem. I can manually
> mount that NFS export (and others) just fine. So there is nothing wrong
> with nfs from the side of the client (mount) and server side. I suspect
> more that this is an issue with nfs4 support in zypper. I will wait a
> little bit longer before I create a new thread, just in case the OP
> responds with a solution.

I don’t understand the problem. Why would zypper care where a directory
is mounted, if it is accessible to the system?


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

On 03/08/2013 04:06 PM, alvinbeach wrote:
> This is definitely a zypper (or libzypp) related problem. I can manually
> mount that NFS export (and others) just fine.

but, can you (now looking back at post #1 and using that as an
example of what you might be doing) at a command line can you

mount “omega:/distrib/repositories/update/11.3 on
/var/adm/mount/AP_0x00000001:” and then

cd omega:/distrib/repositories/update/11.3

and enter that 11.3 directory?? that is: is it actually mounted where
you wanted it mounted?

so, i think Henk’s question (in post #2 which was never answered by
the OP) might be key here…for more troubleshooting why don’t you
please copy/paste your command line actions to manually mount and
then access the NFS directory…

please post the input/output (prompt to prompt) inside “code tags” as
described here http://goo.gl/i3wnr

and, as well , please copy/paste to us the exact error thrown by zypper


dd
http://tinyurl.com/DD-Caveat

I think there may be some confusion. This issue is with NFS mounts using repos that are configured with a nfs:// URL. This isn’t the same as using local directories that are NFS mount points. For instance, I added the repo using YaST->Software Repositories and clicking on Add. Then I selected “NFS…” option. This adds the repo using a nfs:// URL.

This worked just fine in openSUSE 12.1. When I upgraded the desktops to 12.2, the repositories failed with the “Unable to verify…” error message. What I noticed with NFS3 mounts is that it takes a long time to refresh the repository. I can easily switch the repo in Yast to be “Local Directory”, however, I found using the NFS option more reliable and easier in that if I didn’t mount the NFS repo, Yast will do that automagically when it refreshes.

So, to summaries, this issue is only related to yast/zypper/libzypp. There seems to be some sort of bug with either zypper or libzypp when it comes to nfs:// repositories?

On 03/11/2013 01:06 PM, alvinbeach wrote:

> So, to summaries, this issue is only related to yast/zypper/libzypp.
> There seems to be some sort of bug with either zypper or libzypp when it
> comes to nfs:// repositories?

i can’t tell you if there is a bug or an error in how you are going
about it *…maybe you could get that answered on the mail list or
IRC (begin here: http://en.opensuse.org/openSUSE:Communication_channels)

or just write the bug, if it is a ‘user’ problem (and not a bug)
someone will so note…

or wait until one with more YaSR/zypper knowledge tells it is a
bug, or the error (if any) in your procedure…


dd

It’s certainly is a strange error, especially that the same repo (Desktop running the NFS server) works just fine in openSUSE 12.1. I have another desktop running openSUSE 12.1, configured to use nfs:// and that works just fine. Both the 12.1 and 12.2 desktops use the NFS repo on another desktop which is openSUSE 12.2.

I will take this to the ML. Many thanks.

Cheers,

Alvin

On 2013-03-11 13:06, alvinbeach wrote:
>
> I think there may be some confusion. This issue is with NFS mounts using
> repos that are configured with a nfs:// URL. This isn’t the same as
> using local directories that are NFS mount points. For instance, I added
> the repo using YaST->Software Repositories and clicking on Add. Then I
> selected “NFS…” option. This adds the repo using a nfs:// URL.

I never knew about that method. :-o

You could start by saying how the nfs server is defined (the export
line) and how zypper imports it (the zypper lr --details output). Same
here as in the ML - I saw your post and did not understand a word till
you explained it again here.

I it were me, I would use http:// (or ftp), I don’t see the advantage
with nfs. Well, another method available.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

I do have apache2 running that I use for my Intranet. I have a webcalendar and viewcv setup and working. What do I need to do to setup http:// RPM repo access? Where can I find more information on this?

As for my NFS export:

/usr/local/data      192.168.11.0/24(fsid=0,crossmnt,rw,root_squash,sync,no_subtree_check)

My NFS mount line in /etc/fstab is as follows (some on both 12.1 and 12.2 desktops):

192.168.0.10:/repositories     /mnt/repositories      nfs4    defaults,intr,hard,user         0 0

Note that “repositories” is a subdirectory of /usr/local/data on the server.

Output of zypper lr --details | grep MyRepo. I added the column headers for clarity.

#  | Alias                             | Name                       | Enabled | Refresh | Priority | Type   | URI                                                                                 | Service
---+-----------------------------------+----------------------------+---------+---------+----------+--------+-------------------------------------------------------------------------------------+--------
7 | MyRepo                        | MyRepo:Apps                    | Yes     | Yes     |   98     | rpm-md | nfs://192.168.0.10/repositories/MyRepo%3a/Apps?type=nfs4

I have a few repositories on the server. They are all the same. I have one for Apps (see above) and one for Development. On the 12.2 desktop, both Apps and Development fail.

Note that I do have a NFS mount on both desktops that I use for making backups:

192.168.0.10:/backup            /mnt/backup                     nfs4    defaults,intr,hard,user         0 0

Note that “backup” is also a subdirectory of /usr/local/data on the server.

Silly me! I just created a symlink to my repositories directory (/usr/local/data/repositories) in /srv/www/htdocs. Now my 12.2 box can use it. Next time I will have 2 cups of coffee before I post!

I marked the subject as a WORKAROUND since I believe that the nfs:// is still broken. This workaround worked for me in all of 2min only because I had an already functional apache2 install/setup.

alvinbeach wrote:
> … I just created a symlink to my repositories directory
> (/usr/local/data/repositories) in /srv/www/htdocs. Now my 12.2 box can
> use it…
>
> … This workaround worked for me in all of 2min only because
> I had an already functional apache2 install/setup.

And because your apache is set up to permit symlinks :slight_smile:
(which I think is not the default because of security concerns)

On 2013-03-12 12:46, alvinbeach wrote:
> I have a few repositories on the server. They are all the same. I have
> one for Apps (see above) and one for Development. On the 12.2 desktop,
> both Apps and Development fail.

All that look correct to me… but I have never used NFS repos, did not
know they exist.

On 2013-03-12 13:06, alvinbeach wrote:>
> alvinbeach;2534020 Wrote:
>> I do have apache2 running that I use for my Intranet. I have a
>> webcalendar and viewcv setup and working. What do I need to do to setup
>> http:// RPM repo access? Where can I find more information on this?
>>
>
> Silly me! I just created a symlink to my repositories directory
> (/usr/local/data/repositories) in /srv/www/htdocs. Now my 12.2 box can
> use it. Next time I will have 2 cups of coffee before I post!

Well, it is not typical having symlinks working in apache, but
otherwise, it is easy. After all, all public repos are http or ftp.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Thanks for the reminder guys. I disabled symlink support. Instead I am using “Alias” commands in .conf files in apache2/conf.d.

This is just an internal server that cannot be accessed via the Internet. Still, probably good form (and practice) to stick with a proper setup.

  1. Using YAST configured options as a guide, NFS is not an option… only http, https, ftp and smb/cifs.

  2. Despite no NFS option, I would think that if you mounted a remote directory locally, you should be able to use zypper or yast using any transport not natively supported.

TSU

Well, the guide is wrong or perhaps it was updated for the release of 12.3? Perhaps the option doesn’t/will not exist in 12.3…will find out in 20 hours :wink: