puppetlabs/Razor — pull request #133 by tjmcs (2012-07-11 16:59:58+00:00)
Title: Fixes #130 and a couple of other (unreported) issues

These issues all resulted from recent changes to the way that the Razor configuration is obtained by the RazorDaemon class defined within this script. Previously, this class accessed the configuration directly (as an object), but changes that were made to the razor_daemon.rb script to fix a log rotation error (Pull Request #117) meant that the configuration is now being returned through the Razor web API (which means that the keys in the resulting hash are all prefixed with an "@" sign). As a result of these changes, the previous code which used a line like
```
node_expire_timeout = razor_config['node_expire_timeout']
```
to obtain the "timeout" value to use for node expiration) no longer returned the desired value from the Razor configuration. Instead, a line like
```
node_expire_timeout = razor_config['@node_expire_timeout']
```
had to be used to obtain this same value. This commit makes all of the appropriate changes to the razor_daemon.rb script to resolve issues from this recent change to how the Razor configuration values are returned to the razor_daemon.rb script from its RazorDaemon class. This includes fixes to two undiscovered, but related, issues

1. A similar issue with retrieving the daemon minimum cycle time (how long the daemon waits between cycles of it's event handling loop) from the Razor configuration and
2. A similar issue that would be triggered only when the persistence host/port were reported as part of the error that is printed when the connection to the persistence database failed