Project

General

Profile

Actions

Bug #12453

closed

Ubuntu: foreman-proxy 1.10.0~rc2-1 does not migrate DNS plugin settings

Added by Mattias Giese over 8 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Debian/Ubuntu
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

/etc/foreman-proxy/settings.d/dns.yml was not migrated to use the new setting dns_nsupdate.
The setting 'nsupdate' was preserved and foreman-proxy fails to load the plugin (because it does not exist)

root@foreman:/var/log/foreman-proxy# ls -l migrate_settings*
-rw-r--r-- 1 foreman-proxy foreman-proxy   0 Oct 30 06:37 migrate_settings.log
-rw-r--r-- 1 foreman-proxy foreman-proxy 179 Oct 29 16:45 migrate_settings.log.1.gz
-rw-r--r-- 1 foreman-proxy foreman-proxy 189 Oct 26 18:53 migrate_settings.log.2.gz
-rw-r--r-- 1 foreman-proxy foreman-proxy 178 Sep 23 00:41 migrate_settings.log.3.gz
-rw-r--r-- 1 foreman-proxy foreman-proxy 177 Aug 24 11:32 migrate_settings.log.4.gz
-rw-r--r-- 1 foreman-proxy foreman-proxy 178 Aug 15 09:55 migrate_settings.log.5.gz
root@foreman:/var/log/foreman-proxy# zcat migrate_settings.log.1.gz
using:
  config file: /usr/share/foreman-proxy/config/settings.yml,
  modules config dir: /etc/foreman-proxy/settings.d,
  working dir: /tmp/tmp.oCgPt19DF1,
  migrations dir: /usr/share/foreman-proxy/extra/migrations,
  migrations state path: /usr/share/foreman-proxy/config/migration_state

Running migrations...

Actions #1

Updated by Mattias Giese over 8 years ago

The migrate_settings log from the point of installation:

root@foreman:/var/log/foreman-proxy# zcat migrate_settings.log.2.gz
using:
  config file: /usr/share/foreman-proxy/config/settings.yml,
  modules config dir: /etc/foreman-proxy/settings.d,
  working dir: /tmp/tmp.SLkuCa0HMJ,
  migrations dir: /usr/share/foreman-proxy/extra/migrations,
  migrations state path: /usr/share/foreman-proxy/config/migration_state

Running migrations...
migrate_dns_settings
Actions #2

Updated by Dominic Cleal over 8 years ago

  • Category set to Debian/Ubuntu
  • translation missing: en.field_release set to 63

Hm, that looks correct - migrate_dns_settings is the one that should do it. We'll have to test this a bit more.

OS was Ubuntu 14.04/trusty.

Actions #3

Updated by Dominic Cleal over 8 years ago

I'm unable to reproduce this, I wonder if something else could have overwritten it with the old config files?

root@foremandeb:~# cat /etc/foreman-proxy/settings.d/dns.yml
---
# DNS management
:enabled: false
# valid providers:
#   dnscmd (Microsoft Windows native implementation)
#   nsupdate
#   nsupdate_gss (for GSS-TSIG support)
#   virsh (simple implementation for libvirt)
:dns_provider: nsupdate
# use this setting if you are managing a dns server which is not localhost though this proxy
:dns_server: 127.0.0.1
# use this setting if you want to override default TTL setting (86400)
:dns_ttl: 86400
# use dns_tsig_* for GSS-TSIG updates using Kerberos.  Required for Windows MS DNS with
# Secure Dynamic Updates, or BIND as used in FreeIPA.  Set dns_provider to nsupdate_gss.
:dns_key: /etc/bind/rndc.key
#:dns_tsig_keytab: /usr/share/foreman-proxy/dns.keytab
#:dns_tsig_principal: DNS/host.example.com@EXAMPLE.COM
root@foremandeb:~# apt-get --only-upgrade install foreman-proxy                                                                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  foreman-proxy
1 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Need to get 79.8 kB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Get:1 http://deb.theforeman.org/ jessie/1.10 foreman-proxy all 1.10.0~rc2-1 [79.8 kB]
Fetched 79.8 kB in 0s (126 kB/s)   
(Reading database ... 64782 files and directories currently installed.)
Preparing to unpack .../foreman-proxy_1.10.0~rc2-1_all.deb ...
Unpacking foreman-proxy (1.10.0~rc2-1) over (1.9.3-1) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up foreman-proxy (1.10.0~rc2-1) ...

Configuration file '/etc/foreman-proxy/settings.d/dhcp.yml'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** dhcp.yml (Y/I/N/O/D/Z) [default=N] ? 

Configuration file '/etc/foreman-proxy/settings.d/dns.yml'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** dns.yml (Y/I/N/O/D/Z) [default=N] ? 
Installing new version of config file /etc/foreman-proxy/settings.yml.example ...
root@foremandeb:~# ls -l /etc/foreman-proxy/settings.d/                                                                                
total 60
-rw-r----- 1 root foreman-proxy  317 Nov 12 15:14 bmc.yml
-rw-r----- 1 root foreman-proxy  740 Nov 12 15:14 dhcp.yml
-rw-r----- 1 root foreman-proxy  836 Oct 29 08:44 dhcp.yml.dpkg-dist
-rw-r--r-- 1 root root            27 Nov 12 15:14 dns_dnscmd.yml
-rw-r--r-- 1 root root            27 Nov 12 15:14 dns_nsupdate_gss.yml
-rw-r--r-- 1 root root            58 Nov 12 15:14 dns_nsupdate.yml
-rw-r--r-- 1 root root           259 Nov 12 15:14 dns_virsh.yml
-rw-r----- 1 root foreman-proxy   64 Nov 12 15:14 dns.yml
-rw-r----- 1 root foreman-proxy  321 Oct 29 08:44 dns.yml.dpkg-dist
-rw-r--r-- 1 root root            92 Nov 12 15:14 facts.yml
-rw-r----- 1 root foreman-proxy   95 Nov 12 15:14 puppetca.yml
-rw-r----- 1 root foreman-proxy 2239 Nov 12 15:14 puppet.yml
-rw-r----- 1 root foreman-proxy  358 Nov 12 15:14 realm.yml
-rw-r----- 1 root foreman-proxy 1086 Nov 12 15:14 templates.yml
-rw-r----- 1 root foreman-proxy  167 Nov 12 15:14 tftp.yml
root@foremandeb:~# cat /etc/foreman-proxy/settings.d/dns.yml
---
:enabled: false
:use_provider: dns_nsupdate
:dns_ttl: 86400
Actions #4

Updated by Dominic Cleal over 8 years ago

  • Status changed from New to Need more information

Setting to NMI in case anybody else can reproduce it. If you're trying to, do export DEBUG=1 when running apt-get so we get output from the postinst scripts.

Actions #5

Updated by Anonymous over 8 years ago

Is the original log complete? If so, it shows that no migrations were executed. The only way that could happen if config files were migrated before and the migration state at /usr/share/foreman-proxy/config/migration_state was kept after that. Removing the state file and reinstalling should fix the issue. Was the package downgraded before this upgrade by any chance?

Actions #6

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release changed from 63 to 104
Actions #7

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release deleted (104)
Actions #8

Updated by Anonymous about 8 years ago

  • Status changed from Need more information to Closed

Closing as not reproducible and there were no further similar reports.

Actions #9

Updated by Dominic Cleal almost 8 years ago

  • Status changed from Closed to Rejected
Actions

Also available in: Atom PDF