Project

General

Profile

Actions

Bug #6698

closed

Ncf init fails in webapp postinst

Added by Alexis Mousset over 9 years ago. Updated over 9 years ago.

Status:
Released
Priority:
N/A
Assignee:
Matthieu CERDA
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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.

Actions #1

Updated by Vincent MEMBRÉ over 9 years ago

Is it preventing installation on RHEL6 ? stopping installation process ?

Or just displaying an error ?

Actions #2

Updated by Vincent MEMBRÉ over 9 years ago

Was it after an installation or an upgrade ?

Actions #3

Updated by Alexis Mousset over 9 years ago

It was after an installation. It is just displaying an error, and the ncf init does not seem necessary in this directory.

Actions #4

Updated by Alexis Mousset over 9 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.

Actions #5

Updated by Vincent MEMBRÉ over 9 years ago

Great analysis !

Is the ncf init mandatory ? I don't think so

Maybe we could remove them

Actions #6

Updated by Alexis Mousset over 9 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 ?

Actions #7

Updated by Alexis Mousset over 9 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.

Actions #8

Updated by Alexis Mousset over 9 years ago

  • Status changed from New to In progress
  • Assignee set to Alexis Mousset
Actions #9

Updated by Alexis Mousset over 9 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
Actions #10

Updated by Alexis Mousset over 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #11

Updated by Matthieu CERDA over 9 years ago

Actions #12

Updated by Vincent MEMBRÉ over 9 years ago

  • Category changed from Packaging to System integration
Actions #13

Updated by Vincent MEMBRÉ over 9 years ago

  • Subject changed from ncf init fails in webapp postinst to Ncf init fails in webapp postinst
Actions #14

Updated by Vincent MEMBRÉ over 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.12, 3.0.7 and 3.1.0 which were released today.

Actions

Also available in: Atom PDF