Bug 1401320

Summary: RFE: Increate virt-sysprep coverage a bit
Product: [Community] Virtualization Tools Reporter: Marko Myllynen <myllynen>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: ptoscano, rbalakri, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 17:24:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marko Myllynen 2016-12-04 18:39:51 UTC
Description of problem:
virt-sysprep could also clean these files, occasionally seen left behind:

- /etc/*-
- /etc/*.bak
- /root/*.ks

Comment 1 Richard W.M. Jones 2016-12-14 10:28:31 UTC
Patches posted:

https://www.redhat.com/archives/libguestfs/2016-December/msg00111.html

However I cannot see a good rule that would cover /root/*.ks.
It's probably best to delete such files using the option
--delete "/root/*.ks"

Comment 2 Richard W.M. Jones 2016-12-14 13:12:24 UTC
Patch v2 posted:
https://www.redhat.com/archives/libguestfs/2016-December/msg00116.html

Comment 3 Richard W.M. Jones 2016-12-14 17:24:58 UTC
Fixed upstream in libguestfs >= 1.35.18.

Comment 4 Marko Myllynen 2016-12-14 19:53:58 UTC
(In reply to Richard W.M. Jones from comment #1)
> 
> However I cannot see a good rule that would cover /root/*.ks.
> It's probably best to delete such files using the option
> --delete "/root/*.ks"

Good that you didn't merge it; it was a typo/braino. Now double-checking with RHEL 7.3, I see the virt-sysprep removed

/root/anaconda-ks.cfg

but left

/root/original-ks.cfg

behind. Could the latter be removed as well while at it?

Thanks.

Comment 5 Pino Toscano 2016-12-15 08:40:25 UTC
(In reply to Marko Myllynen from comment #4)
> Now double-checking with RHEL 7.3, I see the virt-sysprep removed
> 
> /root/anaconda-ks.cfg
> 
> but left
> 
> /root/original-ks.cfg
> 
> behind. Could the latter be removed as well while at it?

Sure thing -- just done:
https://github.com/libguestfs/libguestfs/commit/331517d9a3ffd6555dad1a3857c2fe1d9e6a434d
will be in libguestfs >= 1.35.19.

Comment 6 Marko Myllynen 2016-12-15 08:42:57 UTC
(In reply to Pino Toscano from comment #5)
> (In reply to Marko Myllynen from comment #4)
> > Now double-checking with RHEL 7.3, I see the virt-sysprep removed
> > 
> > /root/anaconda-ks.cfg
> > 
> > but left
> > 
> > /root/original-ks.cfg
> > 
> > behind. Could the latter be removed as well while at it?
> 
> Sure thing -- just done:
> https://github.com/libguestfs/libguestfs/commit/
> 331517d9a3ffd6555dad1a3857c2fe1d9e6a434d
> will be in libguestfs >= 1.35.19.

Thanks!