control-center/serviced — pull request #1404 by wplu (2014-12-16 23:07:04+00:00)
Title: fixes CC-605: disallow start of agent or master for invalid hostid

https://jira.zenoss.com/browse/CC-605

DEMO - unit test for validation:
```
~/src/europa/src/golang/src/github.com/control-center/serviced/validation
# plu@plu-9: go test -v
=== RUN Test
OK: 2 passed
--- PASS: Test (0.00 seconds)
PASS
ok	github.com/control-center/serviced/validation	0.004s
```

DEMO - serviced started on valid hostid:
```
root@ip-10-111-3-224:~# hostid
6f0ae003

root@ip-10-111-3-224:~# tail -F /var/log/upstart/serviced.log
I1216 22:49:13.937212 07106 daemon.go:511] Trying to discover my pool...
W1216 22:49:13.940514 07106 daemon.go:521] masterClient.GetHost 6f0ae003 failed: hosts_server.go host not found (has this host been added?)
```

DEMO - serviced will not start with invalid hostid:
```
root@ip-10-111-3-224:~# hostid
00000000

root@ip-10-111-3-224:~# tail -F /var/log/upstart/serviced.log
This master has been configured to be in pool: default
I1216 22:52:38.303329 08898 api.go:103] StartServer: [] (0)
F1216 22:52:38.388871 08898 daemon.go:254] Could not get host ID: invalid hostid:'00000000'
Tue Dec 16 22:52:38 UTC 2014: post-stopping serviced daemon - waiting for serviced to stop
Tue Dec 16 22:52:38 UTC 2014: waiting for serviced daemon to stop
Tue Dec 16 22:52:38 UTC 2014: waiting for serviced to stop listening
Tue Dec 16 22:52:38 UTC 2014: waiting for serviced isvcs to stop
Tue Dec 16 22:52:38 UTC 2014: serviced is now stopped - done with post-stop
```