Bug #4312

opennebula-server installation shouldn't break if it can't chown /var/lib/one/datastores

Added by Jaime Melis over 5 years ago. Updated about 5 years ago.

Status:ClosedStart date:01/27/2016
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:Packaging
Target version:Release 5.0
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.14

History

#1 Updated by Javi Fontan about 5 years ago

The error:

Running transaction
  Installing : opennebula-ruby-4.90.0-1.x86_64                                                                             1/4 
warning: group oneadmin does not exist - using root
warning: group oneadmin does not exist - using root
warning: group oneadmin does not exist - using root
warning: group oneadmin does not exist - using root
Please remember to execute /usr/share/one/install_gems to install all the
required gems.
mkdir: cannot create directory ‘/var/lib/one’: File exists
cp: cannot create regular file ‘/var/lib/one/.bash_logout’: Permission denied
cp: cannot create regular file ‘/var/lib/one/.bash_profile’: Permission denied
cp: cannot create regular file ‘/var/lib/one/.bashrc’: Permission denied
chown: changing ownership of ‘/var/lib/one/0’: Operation not permitted
chown: changing ownership of ‘/var/lib/one/1/1f642748ff5469160eaeaf238b25ea74’: Operation not permitted
chown: changing ownership of ‘/var/lib/one/1/a713bb4ef91e4b8edea4652dba2dbbe8’: Operation not permitted
chown: changing ownership of ‘/var/lib/one/1’: Operation not permitted
chown: changing ownership of ‘/var/lib/one’: Operation not permitted
  Installing : opennebula-common-4.90.0-1.x86_64                                                                           2/4 
  Installing : opennebula-4.90.0-1.x86_64                                                                                  3/4 
  Installing : opennebula-server-4.90.0-1.x86_64                                                                           4/4 
Error unpacking rpm package opennebula-server-4.90.0-1.x86_64
error: unpacking of archive failed on file /var/lib/one: cpio: chmod
  Verifying  : opennebula-4.90.0-1.x86_64                                                                                  1/4 
  Verifying  : opennebula-common-4.90.0-1.x86_64                                                                           2/4 
  Verifying  : opennebula-ruby-4.90.0-1.x86_64                                                                             3/4 
  Verifying  : opennebula-server-4.90.0-1.x86_64                                                                           4/4 

Dependency Installed:
  opennebula.x86_64 0:4.90.0-1          opennebula-common.x86_64 0:4.90.0-1          opennebula-ruby.x86_64 0:4.90.0-1         

Failed:
  opennebula-server.x86_64 0:4.90.0-1                                                                                          

Complete!

There are several problems in this output:

  • opennebula-ruby tries to install auth config files in /etc/one with oneadmin:oneadmin ownership
  • pre script for opennebula-common can not create or change permissions of /var/lib/one as it is an nfs mount
  • opennebula-server tries to write files to an nfs mount that does not have write permission

The only hard error that stops package installation is the last one and I don't think the package should skip this error. It will be in an inconsistent state and needs admin intervention.

#2 Updated by Javi Fontan about 5 years ago

  • % Done changed from 0 to 50

Moved auth config files to opennebula server package.

#3 Updated by Javi Fontan about 5 years ago

  • Status changed from Pending to Closed
  • % Done changed from 50 to 100
  • Resolution set to fixed

Also available in: Atom PDF