Version upgrade

Before upgrading

To upgrade to Zentyal 7.0, you have to have a fully updated Zentyal 6.2 version to start with. If you have a previous Zentyal Server version, you have to upgrade gradually to higher versions until you are in the 6.2 version. See the schema below to upgrade from Zentyal 3.2 to Zentyal 7.0:

3.2 -> 4.x -> 5.x -> 6.0 -> 6.1 -> 6.2 -> 7.0

Warning

These instructions are valid for upgrades from the 6.2 version of the Development Edition to the 7.0 version of the Development Edition. To upgrade a Commercial Edition to the latest version, please contact the Support Team. If you don´t have access to the Support Portal [1], contact us [2] to request access.

[1]Support platform: https://zentyal.atlassian.net/servicedesk/customer/portal/4/
[2]Contact form: https://zentyal.com/contact-us/

Before moving forward with the upgrade, you must check the following points:

  • There are no errors in the log files /var/log/zentyal/zentyal.log and /var/log/syslog.
  • There is free disk space on the disk.
  • The server is fully updated.
  • There are no broken packages.
  • There are not database errors in the Samba database nor in the MySQL database.
  • You have Internet access.

Warning

It is mandatory to have the server fully backed up before proceeding with the upgrade. Upgrading is a complex process which can fail and you can end up with a crashed or unstable system.

Upgrade options

Once you have reviewed your system and confirmed that it is stable, you can proceed with the upgrade. You have two options to carry out the upgrade:

1. Upgrade the system by clicking on the Upgrade button available on the Webadmin.

Upgrade button

Upgrade button

Warning

If the server does not have an Internet connection, the button will not be displayed.

2. From the command line (recommended option to detect errors in the process):

sudo /usr/share/zentyal/release-upgrade

Warning

The terminal from which the command is being executed cannot be closed until the process has finished.

Tip

A good practice is to store the output generated by the script in a text file in case it is necessary to analyze it in detail.

After upgrading

Once the upgrade process is complete, you will need to review the following before restarting the server:

1. Check if Ubuntu was upgraded to 20.04:

lsb_release -a

2. Check that all the Zentyal packages have been upgraded to their 7.0 versions:

dpkg -l |grep "zentyal-"

3. Make sure that you don’t have any broken packages:

dpkg -l |egrep -v '^ii|rc'

Then, you can restart the server and do the following checks:

4. Check if the log files /var/log/zentyal/zentyal.log and /var/log/syslog contain errors after reboot.

Tip

When the upgrade completes successfully, add an identifier record to both log files so that you are able to analyze them from there on.

5. If the server is configured as an Additional Domain Controller, you will need to check the following:

5.1 Check that the special user dns-$HOSTNAME is in the DnsAdmins group:

sudo samba-tool group listmembers DnsAdmins

5.1.1 In case the user is not in this group, you have to run the following commands:

sudo samba-tool group addmembers DnsAdmins dns-$HOSTNAME
sudo zs dns restart

6. Finally, confirm the correct operation of each module.

Troubleshooting

In case the upgrade has failed, you must identify the status of the server, before considering restoring a backup.

1. Check that the operative system (Ubuntu) has upgraded to 20.04:

lsb_release -a

2. Check that the Zentyal modules were upgraded to 7.0:

dpkg -l | grep 'zentyal-'

3. Check if you have broken packages:

dpkg -l | egrep -v '^ii|rc'

Broken packages

If you have broken packages, you can try to fix them with the following commands.

To fix all the packages at once:

sudo dpkg --configure -a

Warning

It may be necessary to run the command multiple times

In case this does not work, you will have to do it package by package:

sudo dpkg --configure name_of_the_package

Warning

You may have to repeat this several times to fix all the packages.

If the problems were finally solved, you will have to determine if the operating system (Ubuntu) is already in the 20.04 version and if the Zentyal modules are in 7.0. You need to know this information to determine those commands within the functions that were not executed in the script [3].

Tip

The functions that you need to analyze are: upgrade_ubuntu, upgrade_zentyal and finishUpgrade.

Warning

Before executing any of the functions, you have to make sure that the script has not changed during the upgrade process.

[3]Script: https://github.com/zentyal/zentyal/blob/support/6.2/main/core/src/scripts/release-upgrade

Certificate of the Zentyal Administrative Interface

If the Zentyal Administrative Interface does not work after the upgrade, possibly the cause is that the certificate was generated using 1024 bits. You can check this with:

sudo openssl x509 -text -in /var/lib/zentyal/conf/ssl/ssl.pem | grep 'bit'

In case this is indeed the problem, you will have to execute the following commands:

sudo rm -rf /var/lib/zentyal/conf/ssl/
sudo /usr/share/zentyal/create-certificate /var/lib/zentyal/conf/ssl \
   `hostname --fqdn`

For other cases, you will have to check the log files: /var/log/zentyal/zentyal.log and /var/log/nginx/error.log.

Iptables

In case you get the following error:

/sbin/iptables: not found

You simply have to run the following command:

sudo ln -s /usr/sbin/iptables /sbin/iptables

Shell

In case you get the following error:

Invalid value for Default login shell: /usr/bin/bash.

You have to run the following command:

sudo ln -s /bin/bash /usr/bin/bash

In addition, you will have to check if the shell exists in the configuration file /etc/shells. If it doesn´t, you will have to add it to the file and then run the following command:

sudo chsh -s /usr/bin/bash

DNS

The issues that may arise when using the Domain Name System (DNS) and Domain Controller and Directory Services modules can be varied, so it will be especially important to locate the incident in your system. To do this, you will have to review at least the following:

  • The log files /var/log/zentyal/zentyal.log and /var/log/syslog.

  • The status of the service:

    sudo journalctl -u named
    
  • The status of the DNS record update:

    sudo samba_dnsupdate --verbose --all-names
    
  • That the special DNS user belongs to the group DnsAdmins:

    sudo samba-tool group listmembers DnsAdmins
    
  • That the essential DNS records exist [4].

[4]DNS record: https://wiki.samba.org/index.php/Verifying_and_Creating_a_DC_DNS_Record