Enhancement #2582

Base: remove bootstrap-console

Added by Giacomo Sanchietti almost 6 years ago. Updated almost 6 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:v6.5-beta3
Resolution: NEEDINFO:No

Description

Remove execution of bootstrap-console on first boot.

Create a script which parses system configuration and initializes e-smith databases and network configuration.
The script must work on each type of installation: interactive, unattended and from a CentOS using yum.


Related issues

Related to NethServer 6 - Feature #1757: ISO: interactive installer CLOSED
Related to NethServer 6 - Feature #2492: Move admin user in LDAP DB CLOSED 12/17/2013 12/19/2013
Related to NethServer 6 - Enhancement #2626: Implement hostname-modify event for samba CLOSED
Duplicated by NethServer 6 - Enhancement #1742: Base: avoid double network restart on first boot event CLOSED

Associated revisions

Revision cdec39d1
Added by Giacomo Sanchietti almost 6 years ago

createlinks, system-init event: remove boostrap-console save and avoid double network restart. Refs #1742 #1757

Modifications:
  • rename first-boot event to system-init event
  • nethserver-base-plymouth-update: do not execute in background
  • execute system-adjust on system-init event
  • nethserver-base-initialize-db replaces boostrap-console

Revision 639142cf
Added by Giacomo Sanchietti almost 6 years ago

nethserver-base-initialize-db: fix behavior when dhcp is enabled (unattended install). Refs #2582

Revision 092ea5f9
Added by Giacomo Sanchietti almost 6 years ago

nethserver-base-initialize-db: fix variable scope. Refs #2582

Revision 9ad8ce87
Added by Giacomo Sanchietti almost 6 years ago

nethserver-base-initialize-db: correctly handle gateway prop when interface is configured with dhcp. Refs #2582

Revision dafc1925
Added by Davide Principi almost 6 years ago

Signal interface-update event after system-adjust. Refs #2582

Revision bae3403c
Added by Davide Principi almost 6 years ago

Use perl strict pragma. Refs #2582

Revision ad8d44e2
Added by Davide Principi almost 6 years ago

Code optimizations. Refs #2582

- Replaced /sbin/e-smith/db occurences with $DB
- Skip commented and blank lines while sourcing bash config files

Revision ad21374f
Added by Davide Principi almost 6 years ago

Expand /etc/sysconfig/network on hostname-modify event. Refs #2582

This makes the hostname persistent on reboot.

Revision a053a68d
Added by Giacomo Sanchietti almost 6 years ago

Network management: avoid resolv.conf overwrite by network stop. Refs #2582

History

#1 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

#2 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

Renamed event first-boot to system-init.

New action nethserver-base-initialize-db configures:
  • timezone
  • DNS
  • FQDN
  • green interface
The script parses all ifcfg-* scripts and stores information on network database. If no green interface can be found, the scripts parses ifconfig output to determinate current ip address. If no ip address can be found the default configuration will be:
  • ip: 192.168.1.100
  • netmask: 255.255.255.0
  • gateway: 192.168.1.1

The green interface is the one used to reach the default gateway.

#4 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Test case 1: installation from interactive installer
  • Install using interactive installer
  • After first boot, check below parameters are the same chosen during installation process:
    • Timezone
    • Language
    • Keyboard
    • Root password
    • Network configuration
Test case 2: unattended installation
  • Install using unattended installer
  • After first boot, check below parameters are the same chosen during installation process:
    • Timezone
    • Language
    • Keyboard
  • root password must be "Nethesis,1234"
  • network configuration should be the same obtained from dhcp server, otherwise see defaults is previous comment
Test case 3: CentOS installation
  • Install a standard CentOS
  • Execute:
    yum localinstall http://pulp.nethesis.it/nethserver/nethserver-release.rpm
    rpm --import /etc/pki/rpm-gpg/*
    yum --disablerepo=* --enablerepo=nethserver-base,nethserver-updates,centos-base,centos-updates --releasever=6.4 install @nethserver-iso
    yum --disableplugin=nethserver_events --disablerepo=* --enablerepo=nethserver-base,nethserver-updates,centos-base,centos-updates,nethserver-testing --releasever=6.4 update @nethserver-iso
    touch /var/spool/first-boot
    reboot
    

No reboot is required.

Note 1

After installation, access to web interface is not enabled because the admin user has no password.
Check if web interface is working after QA of #2492.
As a workaround for QA just set a password to admin user using passwd command.

Note 2

Update documentation about yum installation with following instructions:
After installation, just execute the command below. No reboot is required.

signal-event system-init
Packages
In nethserver-testing:
  • nethserver-base-1.5.0-1.0gitcdec39d1.ns6.noarch.rpm
  • nethserver-base-1.5.0-11.0git12b07501.ns6.noarch.rpm
  • nethserver-base-1.5.0-12.0git639142cf.ns6.noarch.rpm
  • nethserver-base-1.5.0-15.0git092ea5f9.ns6.noarch.rpm
  • nethserver-grub-1.0.2-1.0git5d378363.ns6.noarch.rpm
  • nethserver-release-6.4-5.0gitcb4a41d0.ns6.noarch.rpm

#5 Updated by Davide Principi almost 6 years ago

  • Assignee set to Davide Principi

#6 Updated by Davide Principi almost 6 years ago

Test case 1 is VERIFIED
OK

Test case 2 has FAILED
Tested on a VirtualBox machine with two NICs:
  • eth0 on internal network
  • eth1 on NAT (dhcp)

eth0 is unconfigured, and it's OK.

eth1 is set as role=green, ip=<from dhcp>, gateway=192.168.1.1, bootproto=static. I was expecting bootproto=dhcp, and no gateway. Could you check this?

Test case 3
[N/A]

#7 Updated by Davide Principi almost 6 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 20

#8 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#9 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#10 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-testing:
  • nethserver-base-1.5.0-31.0git9ad8ce87.ns6.noarch.rpm
  • nethserver-base-1.5.0-43.0gita053a68d.ns6.noarch.rpm
Test case 2
The value for gateway prop is searched in 3 different places:
  1. First the script parses /etc/sysconfig/network
  2. If not found, the script will parse ip route command output (this is the case of network configured in dhcp)
  3. If not found, the script will use the one on /etc/sysconfig/network-scripts/ifcfg-ethX
  4. If not found, the default is 192.168.1.1

#11 Updated by Davide Principi almost 6 years ago

  • Assignee set to Davide Principi

#12 Updated by Davide Principi almost 6 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

Test case 1 => OK

Packages:

# rpm -qa | grep ^neth
nethserver-lib-1.4.0-3.0gitce8e11f1.ns6.noarch
nethserver-httpd-admin-1.1.0-10.0gitbc7bb28c.ns6.noarch
nethserver-grub-1.0.2-4.0gitb0d23bc3.ns6.noarch
nethserver-ntp-1.0.5-2.0git8415b940.ns6.noarch
nethserver-yum-1.2.0-1.0git48e08409.ns6.noarch
nethserver-php-1.1.0-1.ns6.noarch
nethserver-hosts-1.0.5-1.ns6.noarch
nethserver-openssh-1.0.3-1.0git7cef03d6.ns6.noarch
nethserver-smartd-1.0.0-1.ns6.noarch
nethserver-release-6.4-5.0gitcb4a41d0.ns6.noarch
nethserver-base-1.5.0-34.0gitad8d44e2.ns6.noarch
nethserver-nethgui-1.3.0-7.0gitbc43d8cd.ns6.noarch

Test case 2 => OK

Test case 3 => OK

#13 Updated by Davide Principi almost 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

Released in nethserver/6.5/base repository.

Also available in: Atom PDF