Bug 500071 - obs-worker init script doesnt work well on shared-disk VM clones
Summary: obs-worker init script doesnt work well on shared-disk VM clones
Status: CONFIRMED
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Adrian Schröter
QA Contact: Adrian Schröter
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-01 15:22 UTC by Michael Brown
Modified: 2016-02-17 10:51 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Brown 2009-05-01 15:22:32 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.
Comment 1 Adrian Schröter 2009-05-04 06:57:54 UTC
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.
Comment 2 Michael Brown 2009-05-04 12:31:30 UTC
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.
Comment 3 Michael Brown 2009-05-24 12:42:10 UTC
any updates? This continues to to bite me whenever packages get upgraded.
Comment 5 Chenzi Cao 2016-02-17 10:51:41 UTC
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!