#2539 ipa-server-install doesn't stop on error
Closed: Fixed None Opened 9 years ago by edewata.

The ipa-server-install script should stop immediately on error. Currently there seem to be cases where the script continues executing the following operations after encountering an error.

In the following example the setup-ds.pl fails because it doesn't have a write permission to /var/lock/dirsrv (due to prior DS installation). The script should have stopped at step 2, but it continues until step 16.

Configuring directory server: Estimated time 1 minute
  [1/35]: creating directory server user
  [2/35]: creating directory server instance
ipa         : CRITICAL failed to restart ds instance Command '/usr/sbin/setup-ds.pl --silent --logfile - -f /tmp/tmp5T3Bad' returned non-zero exit status 1
ipa         : CRITICAL Failed to restart the directory server ([Errno 111] Connection refused). See the installation log for details.
  [3/35]: adding default schema
  [4/35]: enabling memberof plugin
ipa         : CRITICAL Failed to load memberof-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/memberof-conf.ldif -x -D cn=Directory Manager -y /tmp/tmpzvtksY' returned non-zero exit status 255
  [5/35]: enabling referential integrity plugin
ipa         : CRITICAL Failed to load referint-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/referint-conf.ldif -x -D cn=Directory Manager -y /tmp/tmpqlzZeS' returned non-zero exit status 255
  [6/35]: enabling winsync plugin
ipa         : CRITICAL Failed to load ipa-winsync-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/ipa-winsync-conf.ldif -x -D cn=Directory Manager -y /tmp/tmp0zTgQb' returned non-zero exit status 255
  [7/35]: configuring replication version plugin
ipa         : CRITICAL Failed to load version-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/version-conf.ldif -x -D cn=Directory Manager -y /tmp/tmp6PXTcK' returned non-zero exit status 255
  [8/35]: enabling IPA enrollment plugin
ipa         : CRITICAL Failed to load enrollment-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /tmp/tmpyYdtu2 -x -D cn=Directory Manager -y /tmp/tmpEl3ngZ' returned non-zero exit status 255
  [9/35]: enabling ldapi
ipa         : CRITICAL Failed to load ldapi.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /tmp/tmpTOmPEB -x -D cn=Directory Manager -y /tmp/tmpKjZIyT' returned non-zero exit status 255
  [10/35]: configuring uniqueness plugin
ipa         : CRITICAL Failed to load unique-attributes.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /tmp/tmpjKgBwc -x -D cn=Directory Manager -y /tmp/tmpdH0fpH' returned non-zero exit status 255
  [11/35]: configuring uuid plugin
ipa         : CRITICAL Failed to load uuid-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/uuid-conf.ldif -x -D cn=Directory Manager -y /tmp/tmptsrGb9' returned non-zero exit status 255
ipa         : CRITICAL Failed to load uuid-ipauniqueid.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /tmp/tmpOFgBkl -x -D cn=Directory Manager -y /tmp/tmpWAZ2Lg' returned non-zero exit status 255
  [12/35]: configuring modrdn plugin
ipa         : CRITICAL Failed to load modrdn-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/modrdn-conf.ldif -x -D cn=Directory Manager -y /tmp/tmpumHuEX' returned non-zero exit status 255
ipa         : CRITICAL Failed to load modrdn-krbprinc.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /tmp/tmplIN1IS -x -D cn=Directory Manager -y /tmp/tmpb4DBy_' returned non-zero exit status 255
  [13/35]: enabling entryUSN plugin
ipa         : CRITICAL Failed to load entryusn.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/entryusn.ldif -x -D cn=Directory Manager -y /tmp/tmpZvbhPA' returned non-zero exit status 255
  [14/35]: configuring lockout plugin
ipa         : CRITICAL Failed to load lockout-conf.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/lockout-conf.ldif -x -D cn=Directory Manager -y /tmp/tmpUEKYOx' returned non-zero exit status 255
  [15/35]: creating indices
ipa         : CRITICAL Failed to load indices.ldif: Command '/usr/bin/ldapmodify -h edewata-f17.example.com -v -f /usr/share/ipa/indices.ldif -x -D cn=Directory Manager -y /tmp/tmpp2ZLGa' returned non-zero exit status 255
  [16/35]: configuring ssl for ds instance
Unexpected error - see ipaserver-install.log for details:
 {'desc': "Can't contact LDAP server"}

master:

  • b0894a8 stop installer when setup-ds.pl fail

ipa-4-3:

  • 0b2961e stop installer when setup-ds.pl fail

Metadata Update from @edewata:
- Issue assigned to pvoborni
- Issue set to the milestone: FreeIPA 4.3.1

4 years ago

Login to comment on this ticket.

Metadata