Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev scripts must be started from the dev directory #715

Closed
mohierf opened this issue Jan 28, 2017 · 4 comments
Closed

dev scripts must be started from the dev directory #715

mohierf opened this issue Jan 28, 2017 · 4 comments
Labels

Comments

@mohierf
Copy link
Contributor

mohierf commented Jan 28, 2017

Currently the scripts delivered in the ./dev directory of the alignak repo must be launched from the './dev directory elses they do not run properly because the cannot find the used alignak.ini file located in the ../etc directory

@mohierf mohierf added the bug label Jan 28, 2017
@mohierf
Copy link
Contributor Author

mohierf commented Jan 28, 2017

Those scripts are not indended to be used as is for a production server ... they are delivered as examples to build your own alignak scripts.

The main idea behind those scripts is to build an alignak.ini configuration file that declares all the daemons to be started and to have a launch_all.sh script that uses this file to run all the declared daemons with the configuration specified in the alignak.ini file ...

Perharps we should receive the alignak.ini file as the only parameter of launch_all.sh script ?

@mohierf mohierf changed the title dev scripts must bu started from the dev directory dev scripts must be started from the dev directory Jan 28, 2017
mohierf added a commit that referenced this issue Jan 28, 2017
@spea1
Copy link

spea1 commented Jan 28, 2017

# -----------------------------------------------------------------------------
# /usr/local/etc/alignak/alignak.ini
# -----------------------------------------------------------------------------
...
[DEFAULT]
BIN=/usr/local/bin
ETC=/usr/local/etc/alignak
VAR=/usr/local/var/libexec/alignak
RUN=/usr/local/var/run/alignak
LOG=/usr/local/var/log/alignak
...

[alignak-configuration]
# Alignak main configuration file
CFG=%(ETC)s/alignak.cfg
# Alignak secondary configuration file (none as a default)
SPECIFICCFG=
...
[arbiter-master]
### ARBITER PART ###
PROCESS=alignak-arbiter
DAEMON=%(BIN)s/alignak_arbiter.py
CFG=%(ETC)s/daemons/arbiterd.ini
DEBUGFILE=%(LOG)s/arbiter-debug.log


[scheduler-master]
### SCHEDULER PART ###
PROCESS=alignak-scheduler
DAEMON=%(BIN)s/alignak_scheduler.py
CFG=%(ETC)s/daemons/schedulerd.ini
DEBUGFILE=%(LOG)s/scheduler-debug.log
...

cd /opt/sysadmin-menu/repositories/alignak-fix-715/dev
./launch_all.sh -c /usr/local/etc/alignak/alignak.ini
./stop_all.sh -c /usr/local/etc/alignak/alignak.ini
  1. the file "/usr/local/lib/python2.7/dist-packages/alignak/bin/alignak_environment.py" is not used,
    only those from the git directory.
  2. log and pid files are created in the "dev" directory
  3. Stop must be executed twice, poller & reactionner are still being executed
root     10602     1  0 20:51 ?        00:00:00 alignak-poller poller-master
root     10897 10602  1 20:51 ?        00:00:00  \_ alignak-poller-master worker
root     10641     1  0 20:51 ?        00:00:00 alignak-reactionner reactionner-master
root     10913 10641  1 20:51 ?        00:00:00  \_ alignak-reactionner-master worker
  1. No checks are executed

@mohierf
Copy link
Contributor Author

mohierf commented Jan 28, 2017

Thanks for reporting.

for some of your comments I do not have the same behavior on my system ... I will give a try tomorrow

@mohierf
Copy link
Contributor Author

mohierf commented Jan 29, 2017

@spea1:
For 1., I updated the setup script to create an alignak-environment script that I will use in the dev scripts
For 2. I updated the start / stop scripts and it is ok as of now
For 3. I already logged an issue: #673 but I do not know why this happens ...
For 4.. Nothing to deal with the scripts ... perharps a directory problem. Give a try with the most recent updates to confirm if it is still occuring

mohierf added a commit that referenced this issue Jan 29, 2017
- search alignak.ini file absolute/relative to script launch directory
- update installation script
- update start/stop dev scripts
ddurieux added a commit that referenced this issue Jan 29, 2017
Fix #715 - installation and development start scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants