Bug 851653

Summary: NTPconfigError: Cannot replace the old config with the new one (Invalid cross-device link)
Product: [Fedora] Fedora Reporter: Martin Banas <mbanas>
Component: anacondaAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: awilliam, g.kaviyarasu, jonathan, mbanas, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: AcceptedNTH
Fixed In Version: anaconda-18.6.4-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 851323 Environment:
Last Closed: 2012-09-06 00:53:18 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:
Embargoed:
Bug Depends On: 851323    
Bug Blocks: 752662    
Attachments:
Description Flags
gzipped anaconda traceback none

Description Martin Banas 2012-08-24 15:26:39 UTC
Created attachment 606900 [details]
gzipped anaconda traceback

Description of problem:

When chrony is not installed, anaconda fails with error opening /etc/chrony.conf. This issue should be fixed in bug 851323.

When chrony is installed, anaconda fails with different error:
NTPconfigError: Cannot replace the old config with the new one (Invalid cross-device link)

I briefly checked the patch in bug 851323, and I think it doesn't solve this problem.

Actual result:
anaconda 18.7 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/ntp.py", line 145, in save_servers_to_config
    raise NTPconfigError(msg)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/kickstart.py", line 1262, in execute
    conf_file_path=chronyd_conf_path)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 87, in doInstall
    ksdata.timezone.execute(storage, ksdata, instClass)
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 87, in run
    threading.Thread.run(self, *args, **kwargs)
NTPconfigError: Cannot replace the old config with the new one (Invalid cross-device link)

Additional info:
gzipped anaconda-tb is in description (was too big to attach uncompressed)

Comment 1 Adam Williamson 2012-08-27 17:10:41 UTC
Discussed at 2012-08-27 QA meeting, functioning as an NTH review meeting. We agreed to delay the decision on this one as we're not clear exactly what the trigger is, and how often this issue is going to occur. Is this what the patch https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-August/000804.html is intended to fix? What exactly triggers this bug? We don't believe it _always_ happens, I'm fairly sure some people reported they were able to complete TC3 installation without any crash.

Comment 2 Vratislav Podzimek 2012-08-28 09:27:32 UTC
(In reply to comment #1)
> Discussed at 2012-08-27 QA meeting, functioning as an NTH review meeting. We
> agreed to delay the decision on this one as we're not clear exactly what the
> trigger is, and how often this issue is going to occur. Is this what the
> patch
> https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-August/000804.
> html is intended to fix? What exactly triggers this bug? We don't believe it
> _always_ happens, I'm fairly sure some people reported they were able to
> complete TC3 installation without any crash.
Patch for this issue is here:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2012-August/000834.html

And as the commit message explains:
> Use shutil.move for replacing old config with the new one
>
> os.rename fails if source and destination are on different fileystems,
> shutil.move should copy and remove the source in such cases.

I'm not sure if it happens always and also Python's os module's documentation says:
> The operation may fail on some Unix flavors if src and dst are on different
> filesystems.
But I'm afraid it happens at least very often.

Comment 3 Adam Williamson 2012-08-29 16:49:08 UTC
Discussed at 2012-08-29 NTH review meeting. Accepted as NTH with vpodzime's evaluation that it will likely happen often.

Comment 4 Fedora Update System 2012-09-01 05:11:44 UTC
anaconda-18.6.5-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/anaconda-18.6.5-1.fc18

Comment 5 Martin Banas 2012-09-03 08:51:19 UTC
This issue was verified in latest RHEL compose.

Comment 6 Martin Banas 2012-09-03 08:52:20 UTC
Verified also on Fedora TC5.

Comment 7 Fedora Update System 2012-09-06 00:53:18 UTC
anaconda-18.6.5-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.