Bug #6698
closedNcf init fails in webapp postinst
Description
In the installation log, in webapp postinst (on CentOS 6):
ERROR: It looks like this directory is already initialized. Aborting
I happens because the ncf/ncf-hooks.d/ directory is already there at this point.
Updated by Vincent MEMBRÉ almost 10 years ago
Is it preventing installation on RHEL6 ? stopping installation process ?
Or just displaying an error ?
Updated by Vincent MEMBRÉ almost 10 years ago
Was it after an installation or an upgrade ?
Updated by Alexis Mousset almost 10 years ago
It was after an installation. It is just displaying an error, and the ncf init does not seem necessary in this directory.
Updated by Alexis Mousset almost 10 years ago
In the install:
mkdir -p %{buildroot}%{ruddervardir}/configuration-repository/ncf/ncf-hooks.d
In the postinst:
# Do this ONLY at first install if [ $1 -eq 1 ] then echo -e '# This sources the configuration file needed by Rudder\n. /etc/sysconfig/rudder-apache' >> /etc/sysconfig/apache2 echo 'DAVLockDB /tmp/davlock.db' > /etc/%{apache}/conf.d/dav_mod.conf mkdir -p /var/rudder/configuration-repository mkdir -p /var/rudder/configuration-repository/shared-files touch /var/rudder/configuration-repository/shared-files/.placeholder cp -a %{rudderdir}/share/techniques /var/rudder/configuration-repository/ ncf init /var/rudder/configuration-repository/ncf fi
and
# Create and populate technique store if [ ! -d /var/rudder/configuration-repository ]; then mkdir -p /var/rudder/configuration-repository; fi if [ ! -d /var/rudder/configuration-repository/shared-files ]; then mkdir -p /var/rudder/configuration-repository/shared-files; fi if [ ! -d /var/rudder/configuration-repository/techniques ]; then cp -a %{rudderdir}/share/techniques /var/rudder/configuration-repository/ fi if [ ! -d /var/rudder/configuration-repository/ncf ]; then ncf init /var/rudder/configuration-repository/ncf fi
There are some redundant steps.
Updated by Vincent MEMBRÉ almost 10 years ago
Great analysis !
Is the ncf init mandatory ? I don't think so
Maybe we could remove them
Updated by Alexis Mousset almost 10 years ago
The ncf init is only executed on 2.10 versions.
Do you think we can remove it even from 2.10 or that it could be needed on this branch ?
Updated by Alexis Mousset almost 10 years ago
- Target version changed from 3.1.0~beta1 to 2.11.12
Targeting 2.11 as the error message appears on this branch.
Updated by Alexis Mousset almost 10 years ago
- Status changed from New to In progress
- Assignee set to Alexis Mousset
Updated by Alexis Mousset almost 10 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Matthieu CERDA
- Pull Request set to https://github.com/Normation/rudder-packages/pull/678
Updated by Alexis Mousset almost 10 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-packages|689fea2a6512b76e5fecfbd8e6bccab97895cd50.
Updated by Matthieu CERDA almost 10 years ago
Applied in changeset rudder-packages|1eedd9b41fbd728d05f237a6fc2b24a33466fce1.
Updated by Vincent MEMBRÉ almost 10 years ago
- Category changed from Packaging to System integration
Updated by Vincent MEMBRÉ over 9 years ago
- Subject changed from ncf init fails in webapp postinst to Ncf init fails in webapp postinst
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending release to Released