RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1739150 - Leapp fails on ntpd to chrony migration
Summary: Leapp fails on ntpd to chrony migration
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Leapp team
QA Contact: Alois Mahdal
URL:
Whiteboard:
Depends On:
Blocks: 1708241 1727807
TreeView+ depends on / blocked
 
Reported: 2019-08-08 15:49 UTC by Jiri Stransky
Modified: 2019-08-28 12:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-16 16:36:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ntp.conf (906 bytes, text/plain)
2019-08-09 16:38 UTC, Jiri Stransky
no flags Details

Description Jiri Stransky 2019-08-08 15:49:29 UTC
Description of problem:

[  229.616440] upgrade[329]: ============================================================
[  229.617634] upgrade[329]:                            ERRORS
[  229.618399] upgrade[329]: ============================================================
[  229.619419] upgrade[329]: 2019-08-08 11:34:55.039915 [ERROR] Actor: migrate_ntp Message: ntp2chrony failed: [Errno 2] No such file or directory: '/etc/ntp.conf'
[  229.621201] upgrade[329]: ============================================================
[  229.622222] upgrade[329]:                        END OF ERRORS
[  229.623014] upgrade[329]: ============================================================


Version-Release number of selected component (if applicable):

Leapp 0.8.1


Sorry for not providing more info but i'm unable to connect / log in after the upgrade fails this way. In case the issue is not straightforward to solve, please request a reproducer from us.

Comment 2 Jiri Stransky 2019-08-08 15:55:33 UTC
Here is some debugging info from Michele, the ntp.conf is not present, only ntp.conf.rpmsave:

    :/# mount /dev/vda1 /mnt                                        
    [  760.579066] XFS (vda1): Mounting V5 Filesystem              
    [  760.590012] XFS (vda1): Ending clean mount                  
    :/# cd /mnt                                                    
    :/mnt# ls -l                                                    
    total 24                                                        
    drwxr-xr-x   2 root root   25 Aug  8 13:38 backports            
    lrwxrwxrwx   1 root root    7 Aug 12  2018 bin -> usr/bin      
    dr-xr-xr-x   7 root root 4096 Aug  8 13:41 boot                
    drwxr-xr-x   2 root root    6 Oct 10  2018 dev                  
    drwxr-xr-x 106 root root 8192 Aug  8 13:41 etc                  
    drwxr-xr-x   5 root root   56 Aug 12  2018 home                
    lrwxrwxrwx   1 root root    7 Aug 12  2018 lib -> usr/lib      
    lrwxrwxrwx   1 root root    9 Aug 12  2018 lib64 -> usr/lib64  
    drwxr-xr-x   2 root root    6 Aug 12  2018 media                
    drwxr-xr-x   2 root root    6 Aug 12  2018 mnt                  
    drwxr-xr-x   2 root root    6 Aug 12  2018 opt                  
    drwxr-xr-x   2 root root    6 Oct 10  2018 proc                
    dr-xr-x---   8 root root 4096 Aug  8 13:41 root                
    drwxr-xr-x  23 root root 4096 Aug  8 13:40 run                  
    lrwxrwxrwx   1 root root    8 Aug 12  2018 sbin -> usr/sbin    
    drwxr-xr-x   3 root root   18 Aug 12  2018 srv                  
    drwxr-xr-x   2 root root    6 Oct 10  2018 sys                  
    drwxrwxrwt  10 root root  159 Aug  8 13:40 tmp                  
    drwxr-xr-x  12 root root  144 Aug  8 13:40 usr                  
    drwxr-xr-x  20 root root  278 Aug  8 13:37 var                  
     
    :/mnt# ls -l etc/ntp.conf*                                  
    -rw-r--r-- 1 root root 906 Jul 22 08:42 etc/ntp.conf.rpmsave

Comment 3 Jiri Stransky 2019-08-08 15:56:17 UTC
And from IRC:

https://github.com/oamg/leapp-repository/blob/5183755e3903a039136937524b06a3c26b2b89b5/repos/system_upgrade/el7toel8/actors/migratentp/libraries/library.py#L70

17:17 <podvody> i.e. at #70 we extract the configs relative to PWD
17:17 <podvody> however at #73 we reference absolute /etc/ntp.conf

Comment 4 Ina 2019-08-09 13:42:12 UTC
Could you please provide original ntp.conf that was present on the vm being upgraded? I can't easily reproduce your failure with a random non-standard configuration.

Comment 5 Ina 2019-08-09 15:01:00 UTC
Tried upgrading with ntp.conf provided by podvody (http://pastebin.test.redhat.com/787640) and the upgrade has passed flawlessly. 

I'd say we need more information about the system or vm with a repro in ideal scenario.

I was using leapp version 0.8.1 and rhel-7.6-server-x86_64-released. There should be some more factors apart from ntp package with specific config.

Comment 6 Jiri Stransky 2019-08-09 16:38:31 UTC
Created attachment 1602248 [details]
ntp.conf

Comment 7 Jiri Stransky 2019-08-09 16:42:16 UTC
Added ntp.conf, it's pretty much what you have in the pastebin with some blank lines at the end.

Let's discuss on IRC next week, i can set up a reproducer and we can look at the pre-upgrade state and the failed state.

Comment 8 Ina 2019-08-12 17:07:48 UTC
Turns out the scenario I used for reproduction had a flaw, by fixing which I was able to get a clean repro.
This PR should fix the failure you expect https://github.com/oamg/leapp-repository/pull/302 (merged in master already)

Comment 9 Jiri Stransky 2019-08-16 16:08:30 UTC
I wrote it earlier in e-mail but forgot to update the BZ: applying the patch indeed fixes the problem we had. Thanks!

Comment 10 Ina 2019-08-16 16:36:39 UTC
Glad to hear it worked for you as well! Not sure which state is appropriate for the workflow, temporarily moving to Closed/Current release


Note You need to log in before you can comment on or make changes to this bug.