Hello all,
This is actually a report, it seems that I succeeded installing a new
Foreman 1.4/Puppetmaster server and import my data in it.
Before this I attempted to install directly a Foreman 1.5 server and
import my data but the db:migrate script gave so many errors that I
gave up and decided to install Foreman 1.4 and consider updating to 1.5
later.
However, here is a list of issues I came across, some already reported
here :
- db:migrate
Mysql2::Error: Unknown column 'hostgroups.label' in 'order clause':
SELECT hostgroups
.* FROM hostgroups
INNER JOIN
template_combinations
ON hostgroups
.id
=
template_combinations
.hostgroup_id
WHERE
template_combinations
.config_template_id
= 15 ORDER BY hostgroups.label
=> Solution: ALTER TABLE hostgroups ADD label character varying(255);
Mysql2::Error: Duplicate column name 'label': ALTER TABLE hostgroups
ADD labe l
varchar(255)
=> Solution: ALTER TABLE hostgroups DROP label;
Mysql2::Error: Table 'compute_profiles' already exists: CREATE TABLE
compute_profiles
(id
int(11) DEFAULT NULL auto_increment PRIMARY
KEY, name
varchar(255), created_at
datetime NOT NULL, updated_at
datetime NOT NULL) ENGINE=InnoDB
=> Solution: comment-out code in :
/usr/share/foreman/db/migrate/20131224153518_create_compute_profiles.rb
Mysql2::Error: Table 'compute_attributes' already exists: CREATE TABLE
compute_attributes
(id
int(11) DEFAULT NULL auto_increment PRIMARY
KEY, compute_profile_id
int(11), compute_resource_id
int(11),
name
varchar(255), vm_attrs
text, created_at
datetime NOT NULL,
updated_at
datetime NOT NULL) ENGINE=InnoDB
=> Solution: drop table compute_attributes;
After these 4 failures, db:migrate completed.
- After some time the external node classifier /etc/puppet/node.rb
would fail. This was because I forgot to launch db:seed as
explained : Bug #4303: Foreman fails to import reports after upgrade to 1.4 - Foreman
=> BTW: What is the role of this piece of code db:seed ?
-
I have this bug : http://projects.puppetlabs.com/issues/19680
-
Puppet-Proxy import classes works but there are classes that are
alternatively found modified each time to add even if I do it.
Exemple :
a) Run Import-from-Puppet-Proxy :
[X] development Update: os
[X] jmichel Update: os
[X] pierrick Update: os
[X] production Update: os
OK (import)
b) Run Import-from-Puppet-Proxy :
[X] jerome Update: os
OK (import)
Then if I run again Import-from-Puppet-Proxy, it starts again at a),
then b), etc.
Thanks for the help that I already got from the list and from Dominic
specifically.
Jean-Michel
···
On 05/07/2014 10:38 AM, Dominic Cleal wrote:
Now to put this new server in production replacing the current one,
I have 2 choices :
a) copy all /var/lib/puppet/ca/ssl directory from the current server
to the new; stop the current server, give its name and IP to the
newly installed server, probably rerun foreman-installer and that’s
it.
b) copy all /var/lib/puppet/ca/ssl directory from the current server
somewhere; stop the current server; restart installation from
scratch on the new server with the right IP and name; redo the
DB load and migrate operation.
What you people would you prefer ? a) or b) similar experiences in
replacing a foreman/puppet master server by a new one ?
Not sure, but I’d probably opt for a new name as you’re less likely to
run into strange conflicts. The new name can still be signed from the
existing CA (and you can even add an alt-name to the cert for the old
hostname or a CNAME if necessary), so little needs to change.
–
Jean-michel BARBET | Tel: +33 (0)2 51 85 84 86
Laboratoire SUBATECH Nantes France | Fax: +33 (0)2 51 85 84 79
CNRS-IN2P3/Ecole des Mines/Universite | E-Mail: barbet@subatech.in2p3.fr