DocCyblade / tkl-odoo

Turnkey Linux - Odoo v8 (Published v14.2)
https://www.turnkeylinux.org/odoo
GNU General Public License v3.0
21 stars 24 forks source link

Refactor openerp-server init script #46

Closed DocCyblade closed 8 years ago

DocCyblade commented 8 years ago

Refactor openerp-server init script so that it

current testing on the dev-init-rewrite branch

Related issued are #45, #44, and #43

DocCyblade commented 8 years ago

Working on a re-vamped openerp-server init script. Script is a little more complex than the original, with some functions baked in to do some things like logging, checking if the script us running via pid file, locking so the script can't be run more than once, should also wait until process is stopped when restarting or stopping before exiting. Script also logs all script activity to a daemon log, this will capture the servers abort messages if something goes really wrong.

I am doing testing now, but will upload my WIP soon.

DocCyblade commented 8 years ago

Just pushed my WIP changes. They have not been tested yet. Working on that now if I can stay awake.

l-arnold commented 8 years ago

OK, thanks for this. I can test in the AM if that helps. Don't stay up too late!

I did a build off your "dev" branch thinking it was up to date but I see it had its normal first round miss on package building.

Can try the correct branch.

DocCyblade commented 8 years ago

Well the code as is on githug does not work. Made lots of changes to get it to work in a VM, but that pesky pid file.

Need to read up on systemd and init scripts and how they all play out. I think I am missing something.

Sites I will be reading https://wiki.debian.org/systemd

http://blog.erratasec.com/2015/08/about-systemd-controversy.html#.Vh0AM7RiDGk http://www.datamation.com/open-source/whos-afraid-of-systemd.html http://ewontfix.com/14/

DocCyblade commented 8 years ago

Found some good command lines for killing odoo process is for some reason they are still running even after a shutdown. May use this in init code

# This will list all openerp users processes. The top will be the parent process
ps -U openerp -u openerp f

   PID TTY      STAT   TIME COMMAND
 11579 ?        S      0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf
 11599 ?        S      0:00  \_ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf
 11600 ?        S      0:00  \_ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf
 11601 ?        Sl     0:00  \_ /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf
 11602 ?        SN     0:00  \_ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf
 11603 ?        SN     0:00  \_ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

# This builds on the above command but only shows the top two lines
ps -U openerp -u openerp f | head -n 2 

   PID TTY      STAT   TIME COMMAND
 11579 ?        S      0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

# This again builds on the above command but remove the header row
ps -U openerp -u openerp f | head -n 2 | grep -Ev 'PID'

 11579 ?        S      0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

# This again builds on the above command, use awk to only print the PID
# Now we have the PID of the parent process.
ps -U openerp -u openerp f | head -n 2 | grep -Ev 'PID' | awk '{print $1}'

11579

# Putting it all together we can now with one line stop do services 
kill `ps -U openerp -u openerp f | head -n 2 | grep -Ev 'PID' | awk '{print $1}'`

# Now lets check to see if openerp user has anything running?
# Nope, does not look like it.
ps -U openerp -u openerp f

   PID TTY      STAT   TIME COMMAND
DocCyblade commented 8 years ago

I think I am giving back control of the PID file to the init script. Seems there is too many issues with odoo managing it. I will keep the other code however

l-arnold commented 8 years ago

Just so I am clear on this though:

Which file is the init-script vs Which file is the Odoo Control system you reference ?

DocCyblade commented 8 years ago

@l-arnold

the init script /etc/init.d/openerp-server vs having the pid managed by Odoo via /etc/odoo/openerp-server.conf

I am thinking it makes sense, since we are using stop-start-daemon to start Odoo python script lets let that program manage the PID. This program run as root so the PID file created is owned by root. Odoo script runs under openerp user and does not have access to the file. If Odoo runs the show, it seems that the stop-start-daemon program for some reason can't access Odoo PID file so the init system can't tell if it's running. I think I may have this beat this into submission. I should have more on this soon

l-arnold commented 8 years ago

I know/knew these. Isn't the "init-script" a Python script that started with Odoo anyway. I realize it has been modified and moved. Are there 2 such "init scripts "openerp-server" ? I don't think so.

I do get the variable between the control coming from the script or the conf file.
It would seem the two ways of calling the script still call the same script. The variation though is what happens in the "calling" process.

systemctl start openerp-server.service vs my /bin/bash openerp-server start

Both are talking to the same init script. The latter can have some declarations. The former evidently not.

In every case though, the same init script is called.

DocCyblade commented 8 years ago

systemd is sort of calling openerp-server

As I wrote in #35 it seems that if I use only init script it works but systemd is confused. If I use nothing but systemd command everything seems to work. If I mix them systemd seems to loose control and does not know if Odoo is running and tried to run it again causing an error. Seems systemd is not so smart.

I'll let Jeremy chime in if he has time to

l-arnold commented 8 years ago

Ok. My recollection earlier was similar.

If I started and stopped with systemd it seemed to be ok. Then I could Start Stop w/ my /bin/bash openerp-server

Crossing up was causing some problems so would need to always "first stop" with systemd. Then could try various clauses.

For example, I was finding I could not always get a good /bin/bash start unless I used the -c /opt/openerp/odoo/openerp-server.conf clause. Seemed to not require that earlier when the openerp-server was living one directory down in /opt/openerp but the relative move to etc/var what have you made that locator necissary to start odoo properly.

DocCyblade commented 8 years ago

Reading some here http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/

I think I know what's going on. Going to try and document the PID file like they say to do so systemd can track the pid file.

JedMeister commented 8 years ago

Note I wrote this before your last post @DocCyblade and haven't looked at the link you posted...

I'm certainly no authority on systemd but my understanding is that whilst all 3 "service start|stop|restart" commands (i.e. /etc/init.d/daemon start|stop|restart; service daemon start|stop|restart & systemctl start|stop|restart daemon.service) are handled by systemd; the first 2 (i.e. /etc/init.d/daemon start|stop|restart & service daemon start|stop|restart) use a sysvinit compatibility mode. This is provided by the "systemd-sysvinit" package; allowing systemd to handle sysvinit initscripts - like the one you have written and is in /etc/init.d/openerp-server.

The systemd command (systemctl start|stop|restart daemon.service) will still use the old sysvinit initscript (if it doesn't have a "proper" systemd initscript) but from my understanding it doesn't use the compatibility mode (it seems to just gather the info it needs from the old script). In my experience using the systemctl command will give you somewhat unpredictable results unless you create a "proper" systemd initscript...

But seeing that for v14.0 we need to use sysvinit for our OVZ/LXC templates (the version of systemd in Jessie doesn't play nice in a container) we'll need the old sysvinit commands to work consistently. With that in mind IMO it's best to just stick with using the "old" commands (/etc/init.d/daemon start|stop|restart & service daemon start|stop|restart) until we rebase on Debian Stretch (currently "testing").

JedMeister commented 8 years ago

I still haven't read the link (and need to get back to other stuff so won't right now) but guessing at what it might contain I would advise just leaving that be for now. I'd recommend that you revert the PID control to start-stop-daemon (in the init script) and just use the "old" sysvinit commands for now. IMO that'd be quicker and easier.

Definitely keep it in mind for future work but TBH I'm not even clear what (if any) added value there is in letting Odoo control the PID file. Also by my understanding systemd doesn't actually need PID files (because of the way that it traces the processes) but that may be a little flaky because of the sysvinit compatibility...

DocCyblade commented 8 years ago

Just for kicks I did move the pid file back and I still got the same results.

It seems if you use systemd commands they seems to work, but starting or stopping using the init script throws it all out of sync.

Also the systemd restart command does not work at all. I think that's were we are getting issues with because the firstboot init hooks were using restart. I'll use stop/start commands to recycle odoo that should fix the first boot issue.

I'll move the PID control back to start-stop-daemon unless I find a reason to let Odoo control it.

I guess we just need to document not to use the the systemctl restart command and any other gotchas

JedMeister commented 8 years ago

@DocCyblade - Did you miss my comment above?

To clarify: For v14.0 we need to use the "old" sysvinit style commands (I recommend directly executing the initscript - i.e. /etc/init.d/openerp-server) or otherwise the container builds (lxc/ovz, opennode and probably docker too) won't work. They do not have systemd! So Odoo inithooks using systemd style commands (systemctl) would be a show-stopper for Odoo app inclusion for v14.x...

DocCyblade commented 8 years ago

There is no issue using the init style commands they work everytime. The issue is mixing them. So as long as the lxc/ovc builds don't have use systemd then that should work dandy

Not sure how the first boot init hooks will work then. We need to restart Odoo after the database password change or it will not work. A restart would work as well.

So it seems we can't use init scripts on systems with systemd as that leaves the service and systemd out of sync, and can't use the systemd commands as that breaks the lxc/ovz builds

Can we use the service commands? This should work both on systemd and init scripts if what I read was correct as service commands forwards the commands on.

I'll go that route see what happens with the inithooks I can't test the lxc/ovz but if they will work with service openerp-server stop/start then that should work.

JedMeister commented 8 years ago

Ok sorry perhaps I miss interpreted something somewhere...

Let me double check I'm right: If you don't use the systemd command (i.e. systemctl) then everything works ok!?

If so there is no issue. Either calling the initscript directly (/etc/init.d/openerp-server start|stop|restart) or using service (openerp-server start|stop|restart) should work fine (and the result should be exactly the same).

Technically the service command was for upstart (another alternate initsystem that Ubuntu developed and used prior to systemd). Either should work fine. The only reason I suggested calling the initscript direct is that keep it consistent with the other appliance. However that is not a big deal... So long as you don't use the systemctl command we'll be all good! :smile:

DocCyblade commented 8 years ago

Sounds like then we are still looking good. I'll make the changes and do another round of testing in the next few days

DocCyblade commented 8 years ago

@JedMeister I just tried the changes I proposed above manually on a existing build. Everything works perfect. If I start/stop/restart/status all from calling /etc/init.d/openerp-server things work perfect. Also calling it via service command and systemctl seem to all work. The locking seems to be working keeping systemd from running the script too many times causing issues.

Running a build now, will test early AM for my self

l-arnold commented 8 years ago

I will do a test build starting now as well. HUGE THANK YOU for your nose to the grindstone on this! @DocCyblade

DocCyblade commented 8 years ago

@l-arnold - Your build should work pretty good except /etc/init.d/openerp-server restart

I pushed up a change to fix that. Current code on dev-init-rewite works perfect for me.

When testing new code:

@JedMeister - If Landis can confirm all my tests above I will merge this code or make the changes in dev-rc1. All thats left is the last bug :bug: and one last throw down tests

DocCyblade commented 8 years ago

I just did a quick build to ISO and install and everything on my end worked. @l-arnold if you can confirm on your end you get the same results. Just remember going forward to use service or systemctl to stop/start or restart Odoo. Only use the init script when using LXC/OVZ builds. Or better yet just use service command as that should work in both realms.

As for an upgrade script, maybe make that a feature request (an upgrade script) that calls the init script with the correct options.

l-arnold commented 8 years ago

Ok. Pulling next. Will report. (Built but did not install last night)

l-arnold commented 8 years ago

-b tkl-odoo-init-rewrite (my count is 1-2) Will do a few updates here.

Testing new code:

systemctl status openers-server.service ● openers-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

Ran Again after "CHANGING PASSWORD"

systemctl status openerp-server.service ● openerp-server.service - LSB: Open Enterprise Resource Management software Loaded: loaded (/etc/init.d/openerp-server) Active: active (running) since Wed 2015-10-14 15:55:55 UTC; 9min ago Process: 3620 ExecStop=/etc/init.d/openerp-server stop (code=exited, status=0/SUCCESS) Process: 3636 ExecStart=/etc/init.d/openerp-server start (code=exited, status=0/SUCCESS) Main PID: 3644 (python) CGroup: /system.slice/openerp-server.service ├─3644 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3648 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3649 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3650 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf ├─3651 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf └─3652 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

Oct 14 15:55:54 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:54 +0000) - Script started with command: start Oct 14 15:55:54 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:54 +0000) - script called - lock file created Oct 14 15:55:54 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:54 +0000) - created /tmp/openerp-server.lock Oct 14 15:55:54 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:54 +0000) - Starting Odoo Oct 14 15:55:55 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:55 +0000) - Odoo started! Oct 14 15:55:55 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:55 +0000) - script ending - lock file removed Oct 14 15:55:55 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:55 +0000) - removed /tmp/openerp-server.lock Oct 14 15:55:55 tlo-dev-init-rewrite openerp-server[3636]: (Wed, 14 Oct 2015 15:55:55 +0000) - script exit code: 0 Oct 14 15:55:55 tlo-dev-init-rewrite systemd[1]: Started LSB: Open Enterprise Resource Management software.

systemctl stop openerp-server.service systemctl status openers-server.service ● openers-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

  • [ ] systemctl start openers-server.service - Should start

systemctl start openers-server.service Failed to start openers-server.service: Unit openers-server.service failed to load: No such file or directory. systemctl start openers-server.service Failed to start openers-server.service: Unit openers-server.service failed to load: No such file or directory.


cd /etc/init.d

systemctl start openers-server.service

SYSTEM LIVE AGAIN

systemctl status openers-server.service ● openers-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

But System is Running. Installed Database. Installed CRM Module

Still get:

systemctl status openers-server.service ● openers-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

  • [ ] systemctl restart openers-server.service - Should restart

systemctl restart openers-server.service Failed to restart openers-server.service: Unit openers-server.service failed to load: No such file or directory.

But System is Running. (added a Customer)

@JedMeister - If Landis can confirm all my tests above I will merge this code or make the changes in dev-rc1. All thats left is the last bug :bug: and one last throw down tests

l-arnold commented 8 years ago

A little Stumped by this. System is running. Not responding to

systemctl start openers-server.service systemctl stop openers-server.service systemctl status openers-server.service systemctl restart openers-server.service

Just got:

/bin/bash openerp-server stop (Wed, 14 Oct 2015 16:18:50 +0000) - Script started with command: stop (Wed, 14 Oct 2015 16:18:50 +0000) - script called - lock file created (Wed, 14 Oct 2015 16:18:50 +0000) - created /tmp/openerp-server.lock (Wed, 14 Oct 2015 16:18:50 +0000) - Stopping Odoo (Wed, 14 Oct 2015 16:18:50 +0000) - Odoo stopped (Wed, 14 Oct 2015 16:18:50 +0000) - script ending - lock file removed (Wed, 14 Oct 2015 16:18:50 +0000) - removed /tmp/openerp-server.lock (Wed, 14 Oct 2015 16:18:50 +0000) - script exit code: 0 /bin/bash openerp-server start (Wed, 14 Oct 2015 16:19:24 +0000) - Script started with command: start (Wed, 14 Oct 2015 16:19:24 +0000) - script called - lock file created (Wed, 14 Oct 2015 16:19:24 +0000) - created /tmp/openerp-server.lock (Wed, 14 Oct 2015 16:19:24 +0000) - Starting Odoo (Wed, 14 Oct 2015 16:19:25 +0000) - Odoo started! (Wed, 14 Oct 2015 16:19:25 +0000) - script ending - lock file removed (Wed, 14 Oct 2015 16:19:25 +0000) - removed /tmp/openerp-server.lock (Wed, 14 Oct 2015 16:19:25 +0000) - script exit code: 0

Able to Edit the Customer.

but still:

systemctl status openers-server.service ● openers-server.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)

l-arnold commented 8 years ago

Looking at Running Processes (need to find the "services" check note from @JedMeister last week still.

I see these searching for "openerp" 4623 postgres 16:19 postgres: openerp test2 127.0.0.1(36917) idle 4624 postgres 16:19 postgres: openerp test2 127.0.0.1(36918) idle 4626 postgres 16:19 postgres: openerp test2 127.0.0.1(36922) idle 4627 postgres 16:19 postgres: openerp test2 127.0.0.1(36923) idle 4631 postgres 16:20 postgres: openerp test2 127.0.0.1(36935) idle 4633 postgres 16:20 postgres: openerp test2 127.0.0.1(36937) idle

4604 openerp 16:19 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 4614 openerp 16:19 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 4615 openerp 16:19 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 4616 openerp 16:19 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-serv ... 4617 openerp 16:19 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 4618 openerp 16:19 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

Not Finding any reference to the openerp-server.pid file (but do find some other PID files referenced)

DocCyblade commented 8 years ago

If you try and start or stop using the init script systemctl will not work see my notes in the check list

l-arnold commented 8 years ago

ps aux | grep openerp openerp 4604 0.1 10.9 193712 55632 ? S 16:19 0:01 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf openerp 4614 0.2 17.7 249708 90076 ? S 16:19 0:02 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf openerp 4615 0.3 17.9 250056 90724 ? S 16:19 0:02 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf openerp 4616 0.1 11.2 272600 56760 ? Sl 16:19 0:00 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf openerp 4617 0.0 9.7 193712 49376 ? SN 16:19 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf openerp 4618 0.0 9.7 193712 49376 ? SN 16:19 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf postgres 4623 0.0 5.5 228216 28092 ? Ss 16:19 0:00 postgres: openerp test2 127.0.0.1(36917) idle
postgres 4624 0.0 3.9 227040 19892 ? Ss 16:19 0:00 postgres: openerp test2 127.0.0.1(36918) idle
postgres 4626 0.0 5.3 228340 27164 ? Ss 16:19 0:00 postgres: openerp test2 127.0.0.1(36922) idle
postgres 4627 0.0 3.6 226852 18276 ? Ss 16:19 0:00 postgres: openerp test2 127.0.0.1(36923) idle
postgres 4631 0.0 3.0 226784 15616 ? Ss 16:20 0:00 postgres: openerp test2 127.0.0.1(36935) idle
postgres 4633 0.0 3.0 226784 15672 ? Ss 16:20 0:00 postgres: openerp test2 127.0.0.1(36937) idle
root 4781 0.0 0.1 4328 764 ? S 16:31 0:00 sh -c (ps aux | grep openerp) 2>&1 root 4782 0.0 0.0 4328 104 ? S 16:31 0:00 sh -c (ps aux | grep openerp) 2>&1 root 4784 0.0 0.0 4328 108 ? D 16:31 0:00 sh -c (ps aux | grep openerp) 2>&1

DocCyblade commented 8 years ago

Run through the check list I posted. I have step by step commands

l-arnold commented 8 years ago

@DocCyblade You wrote: * "If you try and start or stop using the init script systemctl will not work see my notes in the check list"

I only tested the /bin/bash approach when I was not getting response from systemctl. The logs above are sequential.

DocCyblade commented 8 years ago

I created a nice little status that will list all openerp processes

/etc/init.d/openerp-server status

DocCyblade commented 8 years ago

I just need the init script tested at this point. See the test list I posted. It has the commands in order to do.

l-arnold commented 8 years ago

will test more. Was going sequentially. Open Boxes were not responding.

Let me do a full new round. Have Snapshot at install restart.

DocCyblade commented 8 years ago

I see the issue, typo on my part I see my spell check changed openerp to openers

l-arnold commented 8 years ago

New Checks Set

I expect the issue is my Directory being Root default

(Check Status)

cd /etc/init.d /etc/init.d/openerp-server status (Wed, 14 Oct 2015 17:01:02 +0000) - Script started with command: status (Wed, 14 Oct 2015 17:01:02 +0000) - script called - lock file created (Wed, 14 Oct 2015 17:01:02 +0000) - created /tmp/openerp-server.lock Getting status of Odoo Server: 3642 ? S 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 3646 ? S 0:23 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 3647 ? S 0:21 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 3648 ? Sl 0:00 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf 3649 ? SN 0:01 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 3650 ? SN 0:00 _ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf (Wed, 14 Oct 2015 17:01:02 +0000) - script ending - lock file removed (Wed, 14 Oct 2015 17:01:02 +0000) - removed /tmp/openerp-server.lock (Wed, 14 Oct 2015 17:01:02 +0000) - script exit code: 0

Will Change at least with cd /

DocCyblade commented 8 years ago

@l-arnold - Use this post :-) - If you have issues just post another comment. keep this list clean

Testing should start right from first reboot after install.

When testing new code:

DocCyblade commented 8 years ago

@l-arnold hit the Close and Comment didn't you :-)

l-arnold commented 8 years ago

:smile: then reopened. Sorry.

l-arnold commented 8 years ago

Problem is that the beginning of the checklist is not giving any response. It seems I need to be in

/etc/init.d to get response but will first try to exit (root) with cd /

l-arnold commented 8 years ago

Get good response with cd /

Will work through your list above now from /

(> cd /

systemctl status openerp-server.service ● openerp-server.service - LSB: Open Enterprise Resource Management software Loaded: loaded (/etc/init.d/openerp-server) Active: active (running) since Wed 2015-10-14 16:46:45 UTC; 20min ago Process: 3618 ExecStop=/etc/init.d/openerp-server stop (code=exited, status=0/SUCCESS) Process: 3634 ExecStart=/etc/init.d/openerp-server start (code=exited, status=0/SUCCESS) Main PID: 3642 (python) CGroup: /system.slice/openerp-server.service ├─3642 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3646 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3647 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf ├─3648 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf ├─3649 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf └─3650 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

Oct 14 16:46:44 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:44 +0000) - Script started with command: start Oct 14 16:46:44 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:44 +0000) - script called - lock file created Oct 14 16:46:44 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:44 +0000) - created /tmp/openerp-server.lock Oct 14 16:46:44 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:44 +0000) - Starting Odoo Oct 14 16:46:45 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:45 +0000) - Odoo started! Oct 14 16:46:45 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:45 +0000) - script ending - lock file removed Oct 14 16:46:45 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:45 +0000) - removed /tmp/openerp-server.lock Oct 14 16:46:45 tlo-dev-init-rewrite systemd[1]: Started LSB: Open Enterprise Resource Management software. Oct 14 16:46:45 tlo-dev-init-rewrite openerp-server[3634]: (Wed, 14 Oct 2015 16:46:45 +0000) - script exit code: 0

l-arnold commented 8 years ago

When testing new code:

Also Helpfully "Verbose" (Wed, 14 Oct 2015 17:28:43 +0000) - Stopping Odoo (Wed, 14 Oct 2015 17:28:43 +0000) - Odoo stopped

Again Verbose: (Wed, 14 Oct 2015 17:29:55 +0000) - Starting Odoo (Wed, 14 Oct 2015 17:29:56 +0000) - Odoo started!

Variance Listed in 2 Sections Here: (FIRST LINE VARIES) Getting status of Odoo Server: 5879 ? S 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5888 ? S 0:01 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5889 ? S 0:02 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5890 ? Sl 0:00 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf 5891 ? SN 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5892 ? SN 0:00 _ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

New: Getting status of Odoo Server: 5984 ? S 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5988 ? S 0:02 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5989 ? S 0:02 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5990 ? Sl 0:00 /usr/bin/python /opt/openerp/odoo/openerp-gevent --config=/etc/odoo/openerp-server.conf 5991 ? SN 0:00 python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf 5992 ? SN 0:00 _ python /opt/openerp/odoo/openerp-server --config=/etc/odoo/openerp-server.conf

l-arnold commented 8 years ago

I think we are good. Where are those :beer: :coffee: it will be.

I did not test at the end, but you said there were some issues there.

systemctl restartopenerp-server.service

l-arnold commented 8 years ago

In Same Branch Report (PDF)

Wkhtmltopdf failed (error code: -11). Message:

Seems it should not be loaded but perhaps is. (Moved to New Issue: wkhtmltopdf in init-rewrite branch (not rendering) #47

DocCyblade commented 8 years ago

In Same Branch Report (PDF)

Wkhtmltopdf failed (error code: -11). Message:

Log a new issue with this and attach any screen shots or error code. I'll work on that late tonight if I get a chance I think I know what's going on.

l-arnold commented 8 years ago

Cleaned the Checklist (can clean further). Did note that /etc/init.d commands wouild change the PID for openerp-server (first instance) while systemctl start openerp-server.service would change all the PID numbers after stop and start.

l-arnold commented 8 years ago

I see the openers (not openerp) now finally.

l-arnold commented 8 years ago

I'm good with closing this one.

Need to be clear not to "Mix" start Stop routines. That seems the main take away. Great work Ken!

DocCyblade commented 8 years ago

Looks like you are seeing what I am seeing.

l-arnold commented 8 years ago

I don't think it is a problem per say. If it were would take a pretty complcated set of "start stop" routines. Basically would want to set a marker (1,2,3) about how the service was started and be sure it stops by that method before being started by another method. My thought anyway.

That said, who is really going to be starting and stopping this frequently?