LinuxSysAdminhttps://linuxsysadm.wordpress.com
Things I don't want to look for twice..Sun, 18 Feb 2018 05:12:35 +0000enhourly1http://wordpress.com/https://s2.wp.com/i/buttonw-com.pngLinuxSysAdminhttps://linuxsysadm.wordpress.com
Neutron Rootwrap error on CentOS 7.4https://linuxsysadm.wordpress.com/2017/09/25/neutron-rootwrap-error-on-centos-7-4/
https://linuxsysadm.wordpress.com/2017/09/25/neutron-rootwrap-error-on-centos-7-4/#respondMon, 25 Sep 2017 11:59:08 +0000http://linuxsysadm.wordpress.com/?p=331Had to upgrade to CentOS 7.4. Don’t know if it’s related, but it started just after the upgrade. So, at some point in time, neutron-l3-agent.service was filling up the logs with stuff like:

Docs on rootwrap can be found here: https://wiki.openstack.org/wiki/Rootwrap

]]>https://linuxsysadm.wordpress.com/2017/09/25/neutron-rootwrap-error-on-centos-7-4/feed/0linuxsysadmSSH Agent forwarding doesn’t work on MacOS Sierrahttps://linuxsysadm.wordpress.com/2017/01/09/ssh-agent-forwarding-doesnt-work-on-macos-sierra/
https://linuxsysadm.wordpress.com/2017/01/09/ssh-agent-forwarding-doesnt-work-on-macos-sierra/#respondMon, 09 Jan 2017 14:13:44 +0000http://linuxsysadm.wordpress.com/?p=329So, was pretty sure that “ForwardAgent yes” was added all over my SSH config. And that was working fine, on Linux. When I moved all my stuff to my newly bought Mac, well, discovered that it’s not working anymore. So, actually, 2 lines need to be added to each host configuration:

]]>https://linuxsysadm.wordpress.com/2015/04/22/top-largest-smallest-files-in-a-folder/feed/0linuxsysadmLustre 2.6 on Debian Wheezy (clients)https://linuxsysadm.wordpress.com/2014/10/10/lustre-2-6-on-debian-wheezy-clients/
https://linuxsysadm.wordpress.com/2014/10/10/lustre-2-6-on-debian-wheezy-clients/#respondFri, 10 Oct 2014 13:55:57 +0000http://linuxsysadm.wordpress.com/?p=320I had a shitty job of trying to upgrade Lustre clients to the latest 2.6. I’ve had a lot of bugs on 2.5 some of them were solved in 2.6. My configuration is the following:

– 3 CentOS6 servers (for now)

– 24 Debian Wheezy clients (for now)

Upgrading Lustre on CentOS went pretty smooth. Just found the updated packages and installed. On the other had, Debian clients, let’s say I was not so lucky. So here is what I did:

– installed a Debian 7 x86_64 on a VM (kernel version 3.2.0-4-amd64)

– found a RedHat kernel ported to Debian here (thanks Thomas Stibor) and installed linux-headers and linux-images deb packages, then booted using those:

Then, the tricky part. Somehow, from the rules and makefiles in there, I found out that if you’re not changing latest version of Lustre in debian/changelog, it will build version 2.6 with a name, something like: 1.8.1.50. Also, somewhere along the way, it also expects a “-” after the version. Not good. For this to change, we’ll add this to the beginning of debian/changelog (only the first line counts):

After that, instead of building packages with version 1.8.1.50-1 it will build packages with the same version as the sources are. I think it’s safe to maybe only change first line’s version and that’s it. Then:

make debs

This will create all necessary deb files and will put them in lustre-release/lustre-2.6.0/debs/ (I’ve also included the kernel debs and e2fsprogs, I needed an archive that can be installed on production servers):

PS I wanted to answer someone on stackoverflow but got lazy into formatting this on their website…

]]>https://linuxsysadm.wordpress.com/2014/09/09/atom-git-commands-not-working-on-os-x-yosemite-10-10-beta-2/feed/0linuxsysadmclustered LVM to non-clustered LVMhttps://linuxsysadm.wordpress.com/2014/05/24/clustered-lvm-to-non-clustered-lvm/
https://linuxsysadm.wordpress.com/2014/05/24/clustered-lvm-to-non-clustered-lvm/#respondSat, 24 May 2014 11:21:35 +0000http://linuxsysadm.wordpress.com/?p=314I had to re-configure clustered LVM to non-clustered LVM for some Lustre setup I’m working on. Thing is, clustered LVM can only be accessible if clvmd service is running. But I couldn’t start it, because I needed all cluster services down. After searching, I found that:

]]>https://linuxsysadm.wordpress.com/2014/05/24/clustered-lvm-to-non-clustered-lvm/feed/0linuxsysadmlogrotate doesn’t rotate from file exists errorhttps://linuxsysadm.wordpress.com/2014/05/09/logrotate-doesnt-rotate-from-file-exists-error/
https://linuxsysadm.wordpress.com/2014/05/09/logrotate-doesnt-rotate-from-file-exists-error/#respondFri, 09 May 2014 11:52:45 +0000http://linuxsysadm.wordpress.com/?p=312So, I had the following config:

Paths were valid, ownership of folders was root.root, still, I had sample.log which wouldn’t get renamed to sample.log.1 and new file wasn’t created either. Have been sitting on this for days now. Decided to redo the config (was actually a bigger one, removed every comment, removed everything it wasn’t needed for my test and ran logrotate with the new config, forced. And eventually after carefully reading the logs (used logrotate -vf /path/to/conf) I found out that:

Ok, the file existed. So what? It had the necessary permissions to delete/replace it. But, of course, it didn’t. Moreover, after getting this error, creating other sample.log.1 files didn’t work either so rotation failed. So I deleted that empty file (yes, it was empty) and retried the logrotate on my test config. Of course, it worked. Surely I couldn’t find any documentation on this, so next time it happens, try to run verbosely and check for “file exists” errors. That will explain strange logrotate behavior.

]]>https://linuxsysadm.wordpress.com/2014/04/22/deb-package-status/feed/0linuxsysadmchanging PATH for Ansible and Ansible loopshttps://linuxsysadm.wordpress.com/2014/04/19/changing-path-for-ansible-and-ansible-loops/
https://linuxsysadm.wordpress.com/2014/04/19/changing-path-for-ansible-and-ansible-loops/#respondSat, 19 Apr 2014 16:10:11 +0000http://linuxsysadm.wordpress.com/?p=306So, I’ve had a problem with trying to run things as ansible and sudo. Of course, password was not required for any of my sudo commands, but I often get “command not found”. Clearly, after running “env” with ansible using sudo on a server, I noticed I was missing /usr/sbin and /sbin from my path, as opposed to root’s PATH with had both folders.

In my case, was a Debian init stript which relied on start-stop-daemon, which is in sbin, and I got the command not found error. Here is how you set it up in a playbook:

Today I also discovered loops. I had to run a bunch of commands on a lot of servers, searched a bit and found loops. So, if you need to run 5 commands on your servers on a single task from a playbook, do the following: