cloudbase / salt-openstack

61 stars 33 forks source link

NTP configuration #15

Closed ibenrodriguez closed 9 years ago

ibenrodriguez commented 9 years ago

NTP service needs to be configured AND started as part of any setup.

Right now we're getting an error as follows:

2015-03-06 15:33:27,535 [salt.loaded.int.module.cmdmod][ERROR ] Command ['service', 'ntp', 'status'] failed with return code: 3 2015-03-06 15:33:27,535 [salt.loaded.int.module.cmdmod][ERROR ] output: * NTP server is not running

ionutbalutoiu commented 9 years ago
2015-03-13 10:23:29,509 [salt.loaded.int.module.cmdmod][INFO    ] Executing command ['service', 'ntp', 'status'] in directory '/root'
2015-03-13 10:23:29,539 [salt.loaded.int.module.cmdmod][ERROR   ] Command ['service', 'ntp', 'status'] failed with return code: 3
2015-03-13 10:23:29,539 [salt.loaded.int.module.cmdmod][ERROR   ] output:  * NTP server is not running
2015-03-13 10:23:29,540 [salt.loaded.int.module.cmdmod][INFO    ] Executing command ['service', 'ntp', 'start'] in directory '/root'
2015-03-13 10:23:29,571 [salt.loaded.int.module.cmdmod][DEBUG   ] output:  * Starting NTP server ntpd
2015-03-13 10:23:29,578 [salt.state       ][INFO    ] Service ntp is already enabled, and is running
2015-03-13 10:23:29,578 [salt.state       ][INFO    ] Completed state [ntp] at time 10:23:29.578196

Just tested this. This is not an issue and NTP is configured properly. Above there is a part from minion's log when the ntp state is executed.

The error comes up when it does the ntp service.running checking (see here).

It checks if the service it's already running and if not, it will be started, thus bringing it to the running state.