scVENUS / PeekabooAV-Installer

This repository provides scripts and configuration files to install, update and test a Peekaboo installation
GNU General Public License v3.0
7 stars 9 forks source link

"No option '...' in section '..." errors after updating from 1.6.2 to 1.7 #35

Closed Clevero closed 5 years ago

Clevero commented 5 years ago

Expected Behavior

After running the installer again and change/set only the config parameters to fit your needs, Peekaboo should start normally

Current Behavior

After unning the installer on a 1.6.2 installation, Peekaboo fails to start because of some missing config parameters and sections in the config and does not catch up the new internal defaults

Possible Solution

The installer does update the submodule itself

Steps to Reproduce

  1. Have a working 1.6.2 installation
  2. git pull
  3. git checkout v1.7
  4. run the installer
  5. Try to restart the peekaboo daemon like service peekaboo restart

Context (Environment)

Updating the submodule manually via git submodule update --recursive --remote fixed it. Maybe this could be done automatically in the script?

Detailed Description

example error message:

-- Unit peekaboo.service has begun starting up.
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]: Starting Peekaboo 1.6.2.
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]: 2019-04-24 12:46:05,480 - peekaboo.config - (MainThread) - CRITICAL - configuration option not found
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]: 2019-04-24 12:46:05,480 - peekaboo.config - (MainThread) - ERROR - No option 'user' in section: 'global'
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]: Traceback (most recent call last):
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]:   File "/opt/peekaboo/local/lib/python2.7/site-packages/peekaboo/config.py", line 80, in __parse
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]:     self.user = config.get('global', 'user')
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]:   File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]:     raise NoOptionError(option, section)
Apr 24 12:46:05 peekaboo.sittig.local peekaboo[22086]: NoOptionError: No option 'user' in section: 'global'
Apr 24 12:46:05 peekaboo.sittig.local systemd[1]: peekaboo.service: Main process exited, code=exited, status=1/FAILURE
Apr 24 12:46:05 peekaboo.sittig.local systemd[1]: peekaboo.service: Failed with result 'exit-code'.
Apr 24 12:46:05 peekaboo.sittig.local systemd[1]: Failed to start Peekaboo Extended Email Attachment Behavior Observation Owl.
michaelweiser commented 5 years ago

You've still got 1.6.2 installed because the submodule wasn't updated by git checkout. Can you try git checkout --recurse-submodules v1.7?

Clevero commented 5 years ago

Yes, updating the submodule is the step that I mentioned. Should have mark it better 🤔

Updating the submodule manually via git submodule update --recursive --remote fixed it. Maybe this could be done automatically in the script?

My assumption was that this step is automatically done by the installer

michaelweiser commented 5 years ago

Whoops, sorry, didn't read carefully enough. Yes, I agree, we need this to work automagically.

submodules have other problems as well which we weighed when switching to the current concept, see #9. I'm seriously pondering going back to just installing from PyPI. See #36 for discussion.