Monday, January 19, 2015

X server and nvidia

  • To stop the X session
    • Hit CTRL+ALT+F1 and login using your credentials.
    • kill your current X server session by typing 
      • sudo service lightdm stop or sudo stop lightdm
    •  If you want to reinstall the nvidia exe
      • Enter runlevel 3 by typing 
        • sudo init 3 and install your *.run file.
    •  You might be required to reboot when the installation finishes. If not, run
      • "sudo service lightdm start"  or "sudo start lightdm" to start your X server again.
    • If you haven't stop the X server at all, you can come back to the X server environment from the command line environment by doing:
      • Hit CTRL+ALT+F7 and login using your credentials.


Tuesday, January 6, 2015

puppet



  • to check if the puppet agent is running:
    •   service puppet status
    • usually, the service is monitoreed and should not be stopped
  • Enable / disable
    • [root@p1al25]# puppet agent --disable "Modification blahblah" --verbose
    • [root@p1al25]# puppet agent --enable --verbose
  • Execute puppet agent
    • puppet agent -t  --debug
    • used to install the latest version of the package
  • check if the agent is enabled or disabled
    • [root@p1al25 ~]# service puppet status
    • puppet (pid 4387) is running...
    • [root@p1al25 ~]# puppet agent --disable "my message" --verbose
    • check if it is disabled or not
      • [root@p1al25 ~]# cat `puppet agent --configprint agent_disabled_lockfile` 
      • {"disabled_message":"reason not specified"}
    • I advise to use --verbose, otherwise you don’t get the errors.
  • In the case herebelow, I was using puppet with a non root user. This user doesn’t have the privilege to create files in its root.
    • bash-4.1$ puppet agent
    • bash-4.1$ puppet agent --verbose
      • Error: Could not set 'directory' on ensure: Permission denied - /data1/toto/.puppet
      • Error: Could not set 'directory' on ensure: Permission denied - /data1/toto/.puppet
      • Wrapped exception:
      • Permission denied - /data1/leguide/ciao/.puppet
  • puppet conf
    • puppet config print
      • is supposed to print what is in
      • less /etc/puppet/puppet.conf
  • puppet certificates
    • server:
      • puppet cert clean lgstagevirt-vm-3s-1.toto.com
      • puppet cert list --all |grep vm
    • client:
      • \rm -r /var/lib/puppet/ssl
      • puppet agent -t -d --waitforcert 30
    • then server:
      • puppet cert sign  lgstagevirt-vm-3s-1.toto.com