Rackspace-DOT / nova-agent

Other
4 stars 18 forks source link

preserve firewalld zone #36

Closed carlwgeorge closed 6 years ago

carlwgeorge commented 6 years ago

Firewalld is used in the Red Hat ecosystem (Fedora, RHEL, and CentOS). To bind a network interface to a firewalld zone involves add ZONE=zonename to the ifcfg-ethX file. It would be great if nova-agent can preserve zones in those files when making it's changes.

chder commented 6 years ago

I would suggest right before https://github.com/Rackspace-DOT/nova-agent/blob/3a26a4129b7ede3e8ff1e1c1f01af158c8d256a7/novaagent/libs/centos.py#L35 Read interface_file for the ZONE= line and if it exists, append it right after NM_CONTROLLER down on Line 93.