Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1766740

Summary: unable to write ifcfg file to /etc/sysconfig/network-scripts/ due to bad SELinux labeling
Product: OpenShift Container Platform Reporter: Micah Abbott <miabbott>
Component: RHCOSAssignee: Colin Walters <walters>
Status: CLOSED WONTFIX QA Contact: Michael Nguyen <mnguyen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.zCC: bbreard, dustymabe, imcleod, jligon, mnguyen, nstielau
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1766739 Environment:
Last Closed: 2020-01-31 21:20:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1766739    
Bug Blocks:    

Description Micah Abbott 2019-10-29 19:02:20 UTC
+++ This bug was initially created as a clone of Bug #1766739 +++

In BZ#1766161, the following was reported

(2019-10-29 15:13:10,455 root         ERROR    NM main-loop aborted: Connection update failed: error=nm-settings-error-quark: failed to update connection: Could not open file '/etc/sysconfig/network-scripts/ifcfg-ens3' for writing: Permission denied (3), dev=ens3/<enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>)

Additional investigation via Slack found:

```
type=AVC msg=audit(1572361975.953:149): avc:  denied  { write } for  pid=1477 comm="NetworkManager" name="ifcfg-ens3" dev="vda4" ino=25573980 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0
type=AVC msg=audit(1572361983.181:151): avc:  denied  { write } for  pid=1477 comm="NetworkManager" name="ifcfg-ens3" dev="vda4" ino=25573980 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0
type=AVC msg=audit(1572361990.452:152): avc:  denied  { write } for  pid=1477 comm="NetworkManager" name="ifcfg-ens3" dev="vda4" ino=25573980 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0
```

We need to relabel the ifcfg files that get persisted as part of ignition-dracut

Comment 1 Micah Abbott 2019-10-29 19:03:15 UTC
Cloned to 4.2.z in case we want to ship updated boot images.

Comment 2 Colin Walters 2020-01-31 21:20:09 UTC
I think anyone hitting this should now install 4.3.  We can reopen if someone else complains.