microsoft / omi

Open Management Infrastructure
Other
367 stars 116 forks source link

[rpm] missing openssl and crontabs dependency #699

Open juju4 opened 3 years ago

juju4 commented 3 years ago

Tested on Fedora 33

$ sudo rpm -ivh omi-1.6.8-1.ssl_110.ulinux.x64.rpm --nosignature
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
/var/tmp/rpm-tmp.xiYsNo: line 22: openssl: command not found
Preinstall script error: Unrecognized version of SSL on the system: 
error: %prein(omi-1.6.8-1.x86_64) scriptlet failed, exit status 2

$ sudo rpm -ivh omi-1.6.8-1.ssl_110.ulinux.x64.rpm --nosignature --reinstall
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Creating omiusers group ...
Creating omi group ...
Creating omi service account ...
Updating / installing...
   1:omi-1.6.8-1                      ################################# [100%]
which: no nslookup in (/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin)
Generating a RSA private key
......+++++
............+++++
writing new private key to '/etc/opt/omi/ssl/omikey.pem'
-----
/var/tmp/rpm-tmp.aEUrQO: line 247: [: missing `]'
2021-09-19 17:58:48 : Crontab not configured to update omi keytab automatically. Skip unconfigure
ktutil not found
Checking if cron is installed...
WARNING: LogRotate can't be enabled, please install cron at first!
System appears to have SELinux installed, attempting to install selinux policy module for logrotate
  Trying /usr/share/selinux/packages/omi-selinux/omi-logrotate.pp ...
ERROR: omi-logrotate selinux policy module versions could not be installed

$ sudo rpm -ivh omi-1.6.8-1.ssl_110.ulinux.x64.rpm --nosignature --reinstall
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:omi-1.6.8-1                      ################################# [ 50%]

************************************************************
* Warning: The certificate and keyfile were not generated  *
* since they already exist.                                *
************************************************************
omi already configured
2021-09-19 18:01:14 : Crontab not configured to update omi keytab automatically. Skip unconfigure
ktutil not found
Checking if cron is installed...
Checking if cron/crond service is started...
Set up a cron job to OMI logrotate every 15 minutes
System appears to have SELinux installed, attempting to install selinux policy module for logrotate
  Trying /usr/share/selinux/packages/omi-selinux/omi-logrotate.pp ...
ERROR: omi-logrotate selinux policy module versions could not be installed
Cleaning up / removing...
   2:omi-1.6.8-1                      ################################# [100%]
JumpingYang001 commented 3 years ago

@juju4 Fedora is not in official supported OS list: https://github.com/microsoft/omi#supported-linux-operating-systems openssl is required for omi, and both crontabs and selinux is not required for omi, but if you installed selinux on your system omi will try to install omi semodules.

juju4 commented 3 years ago

I would expect RHEL/Centos to behave similar as package is the same for all rpm-based distribution

If crontab not required, would be nice to suppress this part or make it less looking as required

2021-09-19 17:58:48 : Crontab not configured to update omi keytab automatically. Skip unconfigure
ktutil not found
Checking if cron is installed...
WARNING: LogRotate can't be enabled, please install cron at first!
JumpingYang001 commented 3 years ago

@juju4 correct my original replying: cron used to schedule a job to enable and do log rotate so the omi logs will not be too big, so it would better to have cron, so log rotate can work with omi logs. (If user install selinux, omi installer will install semodules so the log rotate can works with selinux enabling.)

For the "openssl command not found" shows in the installation, it is a good improvement point to show a user-friendly message there something like "openssl is required for omi!", thanks for the suggestion!