Bugzilla – Bug 500071
obs-worker init script doesnt work well on shared-disk VM clones
Last modified: 2016-02-17 10:51:41 UTC
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10 In our deployment of obs, we have a standard disk image for our obs workers and we boot up a variable number of vmware images pointing at this single disk image. This doesnt work well because the worker script uses the hostname as a unique identifier, and all of our images have the same hostname. Setting hostname from DHCP is not an option given our current network infrastructure. A small modification to the init script allows us to use this setup. I changed our obsworker init script to the following and it works for us: echo "screen -t $title ./bs_worker $obsopt $port --root $ROOT/root_$I" \ "--statedir $workerdir/$I --id $HOSTNAME-$(/sbin/ifconfig | grep inet | grep -v 127 | cut -d: -f2 | awk '{print $1}' | head -n1)/$I --reposerver http://$OBS_REPO_SERVER" \ "--srcserver http://$OBS_SRC_SERVER" \ >> $screenrc This has the effect of appending the worker IP address after the hostname, making the 'id' unique. It would be nice if there were a better or more generic way to do this. Perhaps an /etc/sysconfig/ value to enable this workaround. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Hm, I personally like hostnames over IP adresses and it makes the worker listing better readable in monitor pages .. What is the reason why you do not set the host name ? Btw, you can have a look at obs-worker-image in openSUSE:Tools project. These are our deployment images and they work fine with this init script, because they set the hostname via dhcp.
Agreed that hostnames are better than IP addresses... but not sure I could have been more clear when I said, "Setting hostname from DHCP is not an option given our current network infrastructure" So, it is pretty much irrelevant that you have obs-worker-image available in openSUSE:Tools because they would have the exact same problem we're currently having. Which brings us back around to my original solution, which is to find some other source of uniqueness for the build host id. In my case, IP is always unique so I used that. Any other suggestion or implementation would also be welcome.
any updates? This continues to to bite me whenever packages get upgraded.
Hi Adrian, would you please help to look at this quite old issue? I'm not sure whether it is right to assign it to you, please feel free to reassign, thank you!