Description of problem: glusterfs-server-3.5qa2-0.304.git0c1d78f installation is failing with following error. error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh;533cd1ec: cpio: open failed - No such file or directory The provisioning is done in Beaker using source tree and kick-start file. That means we will get the same issue while installing rhs ISO with this version of glusterfs-server package. Version-Release number of selected component (if applicable): glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: Beaker Job: https://beaker.engineering.redhat.com/jobs/625653
Because of the bug, BVT and other automated testing is blocked on the said build.
Installing the said glusterfs-server on a vanilla RHEL6.5 machine failed with the same issue. [root@rhsauto041 ~]# yum install glusterfs-server Loaded plugins: product-id, security, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. rhs3.0-server | 2.9 kB 00:00 rhs3.0-server/primary_db | 11 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package glusterfs-server.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs will be installed --> Processing Dependency: glusterfs-libs = 3.5qa2-0.304.git0c1d78f.el6rhs for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: glusterfs-fuse = 3.5qa2-0.304.git0c1d78f.el6rhs for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: glusterfs-cli = 3.5qa2-0.304.git0c1d78f.el6rhs for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: glusterfs = 3.5qa2-0.304.git0c1d78f.el6rhs for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: libglusterfs.so.0()(64bit) for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: libgfxdr.so.0()(64bit) for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Processing Dependency: libgfrpc.so.0()(64bit) for package: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 --> Running transaction check ---> Package glusterfs.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs will be installed ---> Package glusterfs-cli.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs will be installed ---> Package glusterfs-fuse.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs will be installed ---> Package glusterfs-libs.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================== Installing: glusterfs-server x86_64 3.5qa2-0.304.git0c1d78f.el6rhs rhs3.0-server 562 k Installing for dependencies: glusterfs x86_64 3.5qa2-0.304.git0c1d78f.el6rhs rhs3.0-server 1.1 M glusterfs-cli x86_64 3.5qa2-0.304.git0c1d78f.el6rhs rhs3.0-server 97 k glusterfs-fuse x86_64 3.5qa2-0.304.git0c1d78f.el6rhs rhs3.0-server 73 k glusterfs-libs x86_64 3.5qa2-0.304.git0c1d78f.el6rhs rhs3.0-server 239 k Transaction Summary ============================================================================================================================================================================================== Install 5 Package(s) Total download size: 2.0 M Installed size: 7.1 M Is this ok [y/N]: y Downloading Packages: (1/5): glusterfs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 1.1 MB 00:00 (2/5): glusterfs-cli-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 97 kB 00:00 (3/5): glusterfs-fuse-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 73 kB 00:00 (4/5): glusterfs-libs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 239 kB 00:00 (5/5): glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 562 kB 00:00 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 23 MB/s | 2.0 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : glusterfs-libs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 1/5 Installing : glusterfs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 2/5 Installing : glusterfs-fuse-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 3/5 Installing : glusterfs-cli-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 4/5 Installing : glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 5/5 Error unpacking rpm package glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh;533d0073: cpio: open Verifying : glusterfs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 1/5 Verifying : glusterfs-libs-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 2/5 Verifying : glusterfs-cli-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 3/5 Verifying : glusterfs-fuse-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 4/5 Verifying : glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 5/5 Dependency Installed: glusterfs.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs glusterfs-cli.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs glusterfs-fuse.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs glusterfs-libs.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs Failed: glusterfs-server.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs Complete!
The root cause of the bug is, hook directories are getting the issue is the directories are getting created at /root/var/lib/glusterd/hooks/ , it should be at /var/lib/glusterd/hooks/ Git commit 326b77695f15 changed it to %{buildroot} i.e. /root/ (in glusterfs.spec.in) +%{__install} -p -m 0744 extras/hook-scripts/start/post/*.sh \ + %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post +%{__install} -p -m 0744 extras/hook-scripts/stop/pre/*.sh \ + %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre +%{__install} -p -m 0744 extras/hook-scripts/set/post/*.sh \ + %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post +%{__install} -p -m 0744 extras/hook-scripts/add-brick/post/*.sh \ + %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post +%{__install} -p -m 0744 extras/hook-scripts/add-brick/pre/*.sh \ + %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre
Ignore the previous comment. It is not correct. The root cause may be different.
Observed the same failure on RHEL6.5 with latest Denali bits: Downloading Packages: glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64.rpm | 562 kB 00:04 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 1/2 Error unpacking rpm package glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh;533cff2e: cpio: open Installing : glusterfs-geo-replication-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 2/2 Verifying : glusterfs-geo-replication-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 1/2 Verifying : glusterfs-server-3.5qa2-0.304.git0c1d78f.el6rhs.x86_64 2/2 Installed: glusterfs-geo-replication.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs Failed: glusterfs-server.x86_64 0:3.5qa2-0.304.git0c1d78f.el6rhs
As discussed with #aj, here are the findings It seems like the %ghost declarations in the .spec file for glusterfs for rhs 3.0 are causing the hook directories not to created, despite there being hook scripts in the rpm. When rpm tries to unpack the hook scripts, unless the hook directories were already there (due to upgrading from a previous version of glusterfs eg), the unpack will fail.
I did a simple diff (after greping for hooks) between spec files of rhs2.1(old) and rhs3.0(new) and here is the result. [lmohanty@localhost gluster-downstream]$ diff /tmp/old_specfile /tmp/new_specfile 11,76c11,62 < %exclude %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh < # Following needed by the hooks interface < for file in $(find /var/lib/glusterd/hooks -type f); do < #%ghost %attr(0644,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1 < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/copy-file/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/gsync-create/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post < #%ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre < if [ -d /var/lib/glusterd/hooks ]; then < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1 < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/pre < %{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/"$dir"/{pre,post} < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/pre < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/post < #%{__mkdir_p} %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre < # Rename old hookscripts in an RPM-standard way. These aren't actually --- > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1 > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/add-brick/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/create/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/delete/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/set/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/start/pre > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/post > %ghost %dir %attr(0755,-,-) %{_sharedstatedir}/glusterd/hooks/1/stop/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1 > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/add-brick/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/copy-file/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/create/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/delete/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/gsync-create/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/remove-brick/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/set/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/start/pre > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/post > mkdir -p %{buildroot}%{_sharedstatedir}/glusterd/hooks/1/stop/pre
If we *can't possibly* have the rpm's create the directories upon installation, does this mean the hook scripts have to be moved into place by whatever mechanism creates the dir's on first start?
This is fixed upstream by: http://review.gluster.org/#/c/7391/
Moving to modified as the patch is merged in master.
Fixed in glusterfs-3.5qa2-0.323.git6567d14.
The issue is not seen in the latest build i.e. glusterfs-3.5qa2-0.323.git6567d14. Hence marking the bug verified. https://beaker.engineering.redhat.com/jobs/630329
Setting flags required to add BZs to RHS 3.0 Errata
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-1278.html