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

Unable to install wazuh-agent on Ubuntu 14.04 #14

Open
ston1th opened this issue Feb 27, 2018 · 5 comments · May be fixed by #269
Open

Unable to install wazuh-agent on Ubuntu 14.04 #14

ston1th opened this issue Feb 27, 2018 · 5 comments · May be fixed by #269
Assignees
Labels

Comments

@ston1th
Copy link

ston1th commented Feb 27, 2018

We have installed some systemd stuff on our Ubuntu 14.04 but we are still using the old upstart as init system.
The postinst script will try to use systemctl to enable the wazuh agent if the systemd directory /run/systemd/system exists:

# Service
if [ -f /etc/init.d/wazuh-agent ]; then
if [ -d /run/systemd/system ]; then
systemctl enable wazuh-agent > /dev/null 2>&1
fi
update-rc.d wazuh-agent defaults > /dev/null 2>&1
fi

This call fails:

# systemctl enable wazuh-agent
Failed to issue method call: No such file or directory

Could we add another test to check if we still run with upstart?
Something like:

if [ -d /run/systemd/system ] && [[ ! `/sbin/init --version 2>/dev/null` =~ upstart ]]; then
@BraulioV
Copy link
Contributor

BraulioV commented Mar 1, 2018

Hi @ston1th

I was able to reproduce this error, so we are working in a solution to fix this issue. I will back to you with a solution as soon as possible.

Thank you so much for your feedback :)

Regards,
Braulio.

@DFolchA
Copy link
Contributor

DFolchA commented Aug 21, 2019

Hello team,
This problem still happens, I have been investigating a better way of checking if the system where the package is being installed uses systemd or not.
I have tested several options:

if [ systemctl enable wazuh-agent ]

if command -v systemctl >/dev/null 

if [ $(file /sbin/init =~ systemd ]

Regards,
Daniel Folch

@ston1th
Copy link
Author

ston1th commented Aug 22, 2019

Hello

Ubuntu 14.04 LTS is End-Of-Life since Apr 2019. But there are paid security updates from Canonical until Apr 2022.
https://ubuntu.com/about/release-cycle

@DFolchA @BraulioV so a fix for this is IMHO only nessecery if the Wazuh-Team wants to continue to support the paid Ubutnu 14.04 LTS?
Otherwise people should upgrade their systems to Ubuntu 16.04 LTS or later (which ships with systemd).

@DFolchA DFolchA linked a pull request Aug 23, 2019 that will close this issue
3 tasks
@BraulioV
Copy link
Contributor

BraulioV commented Sep 2, 2019

Hi @ston1th,

Sorry for the late response. Currently, Wazuh supports pretty old systems such as CentOS 5, AIX 5.3, Debian 7, etc. So we will include the fix to support those systems even if they are not supported anymore by their distributors.

Thank you for your patience.

@DFolchA
Copy link
Contributor

DFolchA commented Sep 2, 2019

Hello team,

I have tested the new package generated within docker containers of the following versions to see if it worked properly:

  • Ubuntu 14 LTS with run/systemd/system created
  • Ubuntu 14 LTS without run/systemd/system
  • Ubuntu 16 LTS
  • Ubuntu 18 LTS

I have run intall, uninstall, upgrade, remove and purge tests for every system.

During these tests, I found that this same problem appeared while uninstalling and fixed it in this commit:

aca0c5d

Regards

@DFolchA DFolchA closed this as completed Sep 2, 2019
@DFolchA DFolchA reopened this Sep 2, 2019
@BraulioV BraulioV removed this from the 36th week sprint milestone Sep 9, 2019
@BraulioV BraulioV added this to the 37th week sprint milestone Sep 9, 2019
@alberpilot alberpilot removed this from the 39th week sprint milestone Sep 30, 2019
@vikman90 vikman90 added type/bug Bug issue and removed type: bug labels Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants