Sunday, January 24, 2016

Recursive file permissions issue on / directory

One developer had run "sudo chown -R user ../../" from his home directory and created permission issues at / in one of the systems. Most of the directories at "/" level are with "user:root" permissions and it looks all bad. System has stopped responding to ssh connections. It says "connections refused" to new ssh connections. 

Solution:

This is a very bad condition but yes, we can recover it using the rpm database. Run the command as follows?

# for i in $(rpm -qa); do echo "Working on $i"; rpm --setugids $i; rpm --setperms $i; done

This will restore the user ownership, group ownership as well as set the permissions too. This will display lots and lots of messages on screen, as well as the errors, you can just ignore them out. And it will take much time to restore the permissions/ownership depending on the number of installed rpms.

Please note that only those file/directory permissions/ownership will be changed back to normal which are deployed by rpm. Other file permissions/ownerships won't be changed at all.


Monday, January 11, 2016

VM migration Failure - Timeout Issues!

##### Action plan:
1. Disable Power Management on the host where the vdsm has to be restarted. This is to prevent fencing of that host by RHEV Manager.

2. SSH into destination host and add migration_listener_timeout value as 1500 to the existing values under [vars] in /etc/vdsm/vdsm.conf file followed by restarting the vdsmd service.

migration_listener_timeout = 1500

- Restart the vdsmd service: [ Please ensure 'Power Management' disabled on host before restarting vdsmd service as mentioned in above step 1. ]

# /etc/init.d/vdsmd restart

3. Now try migrating the vm.