Bug 1016184 - Packstack fails to install /etc/nagios/nrpe.cfg
Summary: Packstack fails to install /etc/nagios/nrpe.cfg
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RDO
Classification: Community
Component: openstack-packstack
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ivan Chavero
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-07 16:50 UTC by Steven Hardy
Modified: 2014-02-07 10:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-07 10:01:54 UTC


Attachments (Terms of Use)
packstack answerfile (11.56 KB, text/plain)
2013-10-07 16:50 UTC, Steven Hardy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 51277 0 None None None Never

Description Steven Hardy 2013-10-07 16:50:51 UTC
Created attachment 808966 [details]
packstack answerfile

Description of problem:
I'm persistently getting this error running packstack:

Applying 127.0.0.1_osclient.pp
Applying 127.0.0.1_horizon.pp
Applying 127.0.0.1_provision.pp
Applying 127.0.0.1_ceilometer.pp
Applying 127.0.0.1_nagios.pp
Applying 127.0.0.1_nagios_nrpe.pp
127.0.0.1_osclient.pp :                         [ DONE ]            
127.0.0.1_ceilometer.pp :                     [ DONE ]              
127.0.0.1_provision.pp :                       [ DONE ]             
                                                                                            [ ERROR ]

ERROR : Error during puppet run : Error: /Stage[main]/Nagios_configs/File_line[df_var]: Could not evaluate: No such file or directory - /etc/nagios/nrpe.cfg



Version-Release number of selected component (if applicable):
openstack-packstack-2013.2.1-0.10.dev763.fc20.noarchgui

How reproducible:
In my environment, always

Steps to Reproduce:
1. Run packstack with the attached answerfile
2. packstack fails with the above error


Additional info:
# tail -n 30  /var/tmp/packstack/20131007-173218-B3oQfy/openstack-setup.log
Error: /Stage[main]/Nagios_configs/File_line[df_var]: Could not evaluate: No such file or directory - /etc/nagios/nrpe.cfg
Error: /Stage[main]/Nagios_configs/File_line[load5]: Could not evaluate: No such file or directory - /etc/nagios/nrpe.cfg
Error: /Stage[main]/Nagios_configs/File_line[allowed_hosts]: Could not evaluate: No such file or directory - /etc/nagios/nrpe.cfg
Notice: /Stage[main]//Service[nrpe]: Dependency File_line[allowed_hosts] has failures: true
Notice: /Stage[main]//Service[nrpe]: Dependency File_line[load5] has failures: true
Notice: /Stage[main]//Service[nrpe]: Dependency File_line[df_var] has failures: true
Warning: /Stage[main]//Service[nrpe]: Skipping because of failed dependencies
Notice: Finished catalog run in 0.43 seconds

2013-10-07 17:35:29::ERROR::run_setup::913::root:: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 908, in main
    _main(confFile)
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 577, in _main
    runSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 554, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python2.7/site-packages/packstack/installer/setup_controller.py", line 90, in runAllSequences
    sequence.run(self.CONF)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 105, in run
    step.run(config=config)
  File "/usr/lib/python2.7/site-packages/packstack/installer/core/sequences.py", line 52, in run
    raise SequenceError(str(ex))
SequenceError: Error during puppet run : Error: /Stage[main]/Nagios_configs/File_line[df_var]: Could not evaluate: No such file or directory - /etc/nagios/nrpe.cfg

2013-10-07 17:35:29::INFO::run_setup::598::root:: Removing /var/tmp/packstack/f3a9525dbfb94d8ca87ab426e466f18c on 127.0.0.1 (if it is a remote host)
2013-10-07 17:35:29::INFO::run_setup::532::root::  * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
2013-10-07 17:35:29::INFO::run_setup::532::root::  * Did not create a cinder volume group, one already existed
2013-10-07 17:35:29::INFO::run_setup::532::root::  * To use the command line tools you need to source the file /root/keystonerc_admin created on 127.0.0.1
2013-10-07 17:35:29::INFO::run_setup::532::root::  * To use the console, browse to http://127.0.0.1/dashboard
2013-10-07 17:35:29::INFO::run_setup::532::root::  * To use Nagios, browse to http://127.0.0.1/nagios username : nagiosadmin, password : d6a2487b460b4330

Comment 1 Steven Hardy 2013-10-08 13:50:19 UTC
Ok, so further info after some investigation:

1. The problem is that packstack/puppet won't create the /etc/nagios/nrpe.cfg file if it doesn't exist, simply doing "touch /etc/nagios/nrpe.cfg" allows the file to be populated:

2. Even after the file is populated, there are config problems with the 
/etc/nagios/nagios_host.cfg and 
/etc/nagios/nagios_command.cfg files, which mean starting nagios fails:

# systemctl restart nagios.service
Job for nagios.service failed. See 'systemctl status nagios.service' and 'journalctl -xn' for details.
[root@t430slt ~]# systemctl status nagios.service
nagios.service - SYSV: Starts and stops the Nagios monitor
   Loaded: loaded (/etc/rc.d/init.d/nagios)
   Active: failed (Result: exit-code) since Tue 2013-10-08 14:36:46 BST; 10s ago
  Process: 10941 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=1/FAILURE)

Oct 08 14:36:46 t430slt systemd[1]: nagios.service: control process exited, code=exited status=1
Oct 08 14:36:46 t430slt systemd[1]: Failed to start SYSV: Starts and stops the Nagios monitor.
Oct 08 14:36:46 t430slt systemd[1]: Unit nagios.service entered failed state.

The problems are:
- /etc/nagios/nagios_command.cfg contains a duplicate cinder-list section
- /etc/nagios/nagios_host.cfg contains a duplicate linux-server section for localhost.

Comment 2 Ivan Chavero 2013-10-11 20:26:51 UTC
Added the creation of the file on the puppet modules.

https://review.openstack.org/#/c/51277/


Note You need to log in before you can comment on or make changes to this bug.