[openstack-ansible] Environment variable overflow on Ubuntu 20,04

Taltavull Jean-François jean-francois.taltavull at elca.ch
Wed Dec 7 11:44:33 UTC 2022


Hello,

The 'lxc_container_create' role appends the content of the 'global_environment_variables' OSA variable to '/etc/environment', which is used by the library 'libpam'.

On Ubuntu 20.04 and 'libpam-runtime' library version 1.3.1, this works fine unless one of the environment variables content size exceeds 1024 char. In this case, the variable content is truncated. In our OpenStack deployment, this is the variable 'no_proxy' that overflows.

This limit has been raised to 8192 with 'libpam-runtime'  version 1.4 but there is no backport available in Ubuntu 20.04 repositories.

So what would you think of the following workaround: instead of using '/etc/environment' to store the global variables, the role would create a shell script in '/etc/profile.d' thus avoiding the variable truncation issue related to the 'libpam' library ?

This works on Ubuntu, Debian and CentOS hosts and containers.

Cheers,
JF



More information about the openstack-discuss mailing list