Updating Squid from RHEL7.2 to RHEL7.3

Solution Unverified - Updated

Environment

  • Red Hat Enterprise Linux 7.2 with the squid package installed

Issue

  • Updating the Squid utility from Red Hat Enterprise Linux 7.2 to Red Hat Enterprise Linux 7.3 can cause automatic changes in Squid's configuration
  • How to preview the Squid configuration changes before they are automatically performed by the Squid migration script?

Resolution

If you are updating Red Hat Enterprise Linux 7.2 to Red Hat Enterprise Linux 7.3, the Squid component will be updated from version 3.3.8 to version 3.5.20. Because certain Squid configuration directives are replaced by different ones in 3.5.20, a migration script, squid-migrate-conf.py, has been created, which will automatically execute during the component update process, and which will automatically migrate all Squid configuration files.

The configuration changes performed by squid-migrate-conf.py are backward-compatible, but to prevent unexpected modifications of your local configuration, you can preview the changes the script will make on your system. To do so, install the squid-migration-script package, which contains squid-migrate-conf.py migration script, and run the following command:

# squid-migrate-conf.py

This will automatically detect the contents of the squid.conf file at its default location and write out the changes that updating Squid would make to the configuration file. These changes will NOT be written to squid.conf (or any files included from it), unless you execute squid-migrate-conf.py with the --write-changes option. Nevertheless, if squid-migrate-conf.py is executed with --write-changes, a backup of the original file will be created in the original file's directory, with filename suffix ".bak".

Note that all configuration files included from the migrated configuration file (by Squid's include directive) will be also recursively migrated. If any directives in the original squid.conf file are migrated, a comment will be added with the information about what directive was replaced and which directive replaced it.

If you want to run squid-migrate-conf.py on a Squid configuration file that is not in the default location, you need to use the --conf SQUID_CONF option, where SQUID_CONF is the location of squid.conf. For example, the following command migrates your testing_squid.conf file stored in /tmp directory:

# squid-migrate-conf.py --conf /tmp/testing_squid.conf --write-changes

Thanks to the backward compatibility of the migration changes, the migrated configuration will work properly even if you downgrade Squid after the migration.

For all available options, run squid-migrate-conf.py with -h option:

# squid-migrate-conf.py -h
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.