Foreman 1.8.0 released

Foreman 1.8.0 (final) has been released, with lots of new networking and
installer features, plus with Debian 8 (Jessie) support.

Many thanks to all the people who have tested our release candidates,
investigated and filed bugs. It made a big difference to the quality of
the final release.

Thanks also to the 119 individual contributors during the Foreman 1.8
development cycle, it's great to see this increasing each time.

Skip to the bottom of the e-mail for upgrade instructions.

Headline features

··· ================= Building on Foreman 1.7's increased support for specifying complex network interface configurations, Foreman 1.8 adds a new, simpler UI for managing interfaces when creating or editing hosts.

This also combines the previously separate network configuration for the
Foreman host and the network configuration under the Virtual Machine tab
into one single list of interfaces that’s used for both.


has some new videos showing the new networking UI features.

Hosts can now also have separate provisioning and primary networks,
which will help in more complex environments, plus different subnets can
be set to static or DHCP boot modes. (Help still needed to set up
additional interfaces under preseed:
https://github.com/theforeman/community-templates/issues/173)

Some performance enhancements are in this release, including Turbolinks
to improve the speed of the web UI (look for the thin blue progress bar
when changing pages), a number of database query efficiency improvements
and a new cache for Puppet class imports speeds the process up immensely.

A full list of the changes in Foreman 1.8 is in our release notes:
http://theforeman.org/manuals/1.8/index.html#Releasenotesfor1.8

Upgrading or installing

When upgrading, follow these instructions and please take note of any
known issues, we’ll update the manual if they arise.
http://theforeman.org/manuals/1.8/index.html#3.6Upgrade

If you’re installing a new test instance, follow the quickstart:
http://theforeman.org/manuals/1.8/index.html#2.Quickstart

If you also want to upgrade to Debian 8 (Jessie), ensure you upgrade
your current installation to 1.8 before attempting the dist-upgrade.
See
http://projects.theforeman.org/projects/foreman/wiki/Debian_jessie_notes
for more info.

Packages may be found in the 1.8 directories on both deb.foreman.org and
yum.theforeman.org, and tarballs are on downloads.theforeman.org.

The GPG key used for RPMs and tarballs has the following fingerprint:
64E3 7B1F A6C0 2416 6B53 5495 28F5 A69D 225C 9B71
(Foreman :: Security)

Bug reporting

If you come across a bug, please file it and note the version of Foreman
that you’re using in the report.

Foreman: Foreman
Proxy: Foreman
Installer: Foreman


Dominic Cleal
Red Hat Engineering

I've been hitting F5 all morning, congrats!!

Hi Dominic,

getting an error during upgrade:

root@fm1 /usr/share/foreman$ foreman-rake db:migrate
Workaround for RbVmomi may not work as ComputeResource is already loaded:
ComputeResource
== MoveHostNicsToInterfaces: migrating

··· ======================================= -- add_column(:nics, :primary, :boolean, {:default=>false}) rake aborted! An error has occurred, all later migrations canceled:

Mysql2::Error: Duplicate column name ‘primary’: ALTER TABLE nics ADD
primary tinyint(1) DEFAULT 0

Tasks: TOP => db:migrate
(See full trace by running task with --trace)
root@fm1 /usr/share/foreman$

Any hints?

Regards Thomas

2015-04-28 17:21 GMT+02:00 Dominic Cleal dcleal+g@redhat.com:

Foreman 1.8.0 (final) has been released, with lots of new networking and
installer features, plus with Debian 8 (Jessie) support.

Many thanks to all the people who have tested our release candidates,
investigated and filed bugs. It made a big difference to the quality of
the final release.

Thanks also to the 119 individual contributors during the Foreman 1.8
development cycle, it’s great to see this increasing each time.

Skip to the bottom of the e-mail for upgrade instructions.

Headline features

Building on Foreman 1.7’s increased support for specifying complex
network interface configurations, Foreman 1.8 adds a new, simpler UI for
managing interfaces when creating or editing hosts.

This also combines the previously separate network configuration for the
Foreman host and the network configuration under the Virtual Machine tab
into one single list of interfaces that’s used for both.

https://www.youtube.com/playlist?list=PLLTIBSsvp9qTOEOPI8GKfIxRtb7rc2wGE
has some new videos showing the new networking UI features.

Hosts can now also have separate provisioning and primary networks,
which will help in more complex environments, plus different subnets can
be set to static or DHCP boot modes. (Help still needed to set up
additional interfaces under preseed:
https://github.com/theforeman/community-templates/issues/173)

Some performance enhancements are in this release, including Turbolinks
to improve the speed of the web UI (look for the thin blue progress bar
when changing pages), a number of database query efficiency improvements
and a new cache for Puppet class imports speeds the process up immensely.

A full list of the changes in Foreman 1.8 is in our release notes:
Foreman :: Manual

Upgrading or installing

When upgrading, follow these instructions and please take note of any
known issues, we’ll update the manual if they arise.
Foreman :: Manual

If you’re installing a new test instance, follow the quickstart:
Foreman :: Manual

If you also want to upgrade to Debian 8 (Jessie), ensure you upgrade
your current installation to 1.8 before attempting the dist-upgrade.
See
Debian jessie notes - Foreman
for more info.

Packages may be found in the 1.8 directories on both deb.foreman.org and
yum.theforeman.org, and tarballs are on downloads.theforeman.org.

The GPG key used for RPMs and tarballs has the following fingerprint:
64E3 7B1F A6C0 2416 6B53 5495 28F5 A69D 225C 9B71
(Foreman :: Security)

Bug reporting

If you come across a bug, please file it and note the version of Foreman
that you’re using in the report.

Foreman: Foreman
Proxy: Foreman
Installer:
Foreman


Dominic Cleal
Red Hat Engineering


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Linux … enjoy the ride!

This suggests the migration might have failed first time through for
another reason, and the error you're seeing with a duplicate column is
just because the first line can't be repeated.

Do you have a DB backup you can restore to, then re-run db:migrate to
see the message? (Or check /var/log/foreman/ for a db:migrate log which
might have been captured first time.)

··· On 28/04/15 17:34, Thomas Bendler wrote: > Hi Dominic, > > getting an error during upgrade: > > root@fm1 /usr/share/foreman$ foreman-rake db:migrate > Workaround for RbVmomi may not work as ComputeResource is already > loaded: ComputeResource > == MoveHostNicsToInterfaces: migrating > ======================================= > -- add_column(:nics, :primary, :boolean, {:default=>false}) > rake aborted! > An error has occurred, all later migrations canceled: > > Mysql2::Error: Duplicate column name 'primary': ALTER TABLE `nics` ADD > `primary` tinyint(1) DEFAULT 0 > > Tasks: TOP => db:migrate > (See full trace by running task with --trace) > root@fm1 /usr/share/foreman$ > > Any hints?


Dominic Cleal
Red Hat Engineering

> > [
> ​…]
>

​>
> Any hints?
>
> This suggests the migration might have failed first time through for
> another reason, and the error you're seeing with a duplicate column is
> just because the first line can't be repeated.
>
> Do you have a DB backup you can restore to, then re-run db:migrate to
> see the message? (Or check /var/log/foreman/ for a db:migrate log which
> might have been captured first time.)
> [
> ​…]
>

​You are right, according to the logs this was not the first error:

root@fm1 /var/log/foreman$ cat db_migrate.log-20150429
rake aborted!
An error has occurred, all later migrations canceled:

Mysql2::Error: Error on rename of './foreman/hosts' to
'./foreman/#sql2-5b8-93da' (errno: 152): ALTER TABLE hosts DROP FOREIGN
KEY hos ts_subnet_id_fk

Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Workaround for RbVmomi may not work as ComputeResource is already loaded:
ComputeResource
== MoveHostNicsToInterfaces: migrating

··· 2015-04-29 9:48 GMT+02:00 Dominic Cleal : ======================================= -- add_column(:nics, :primary, :boolean, {:default=>false}) -> 0.3113s -- add_column(:nics, :provision, :boolean, {:default=>false}) -> 0.0135s -- Migrating Host interfaces to standalone Interfaces -- Migrated host1.domain.local-eth0 to nics -- Migrated host2.domain.local-eth0 to nics -- Migrated host3.domain.local-eth0 to nics -- Migrated host4.domain.local-eth0 to nics -- Migrated host5.domain.local-eth0 to nics -- remove_column(:hosts, :ip) -> 0.0501s -- remove_column(:hosts, :mac) -> 0.0364s -- remove_column(:hosts, :primary_interface) -> 0.3690s -- remove_foreign_key(:hosts, {:name=>"hosts_subnet_id_fk"}) rake aborted! An error has occurred, all later migrations canceled:

Mysql2::Error: Duplicate column name ‘primary’: ALTER TABLE nics ADD
primary tinyint(1) DEFAULT 0

Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Workaround for RbVmomi may not work as ComputeResource is already loaded:
ComputeResource
== MoveHostNicsToInterfaces: migrating

– add_column(:nics, :primary, :boolean, {:default=>false})
root@fm1 /var/log/foreman$

But still no clue how to fix … :wink:

Regards Thomas

The migration attempted to remove a foreign key which probably didn't
exist. Some old MySQL DBs that have been upgraded don't have foreign
keys in all of the places we intended, as the old database adapter we
used didn't support them.

The "remove_foreign_key" line should have been wrapped in a "if
foreign_keys …" check (e.g. 20131114084718_extend_user_role.rb).

If you have a database backup (I do hope so), then restore it, comment
out the remove_foreign_key lines in this file,
db/migrate/20140910153654_move_host_nics_to_interfaces.rb, and then run
the db:migrate again.

If not, you could comment out all of the lines in
db/migrate/20140910153654_move_host_nics_to_interfaces.rb's "def up"
section except for the last two remove_column lines, ending up with:

def up
remove_column :hosts, :subnet_id
remove_column :hosts, :domain_id
end

(Since everything before it has already been done, those are the last
two steps.) Re-running db:migrate should then remove those two columns,
complete these migration and move on.

Cheers,

··· On 29/04/15 08:59, Thomas Bendler wrote: > Mysql2::Error: Error on rename of './foreman/hosts' to > './foreman/#sql2-5b8-93da' (errno: 152): ALTER TABLE `hosts` DROP > FOREIGN KEY `hos > ts_subnet_id_fk` > > Tasks: TOP => db:migrate > (See full trace by running task with --trace) > Workaround for RbVmomi may not work as ComputeResource is already > loaded: ComputeResource > == MoveHostNicsToInterfaces: migrating > ======================================= > -- add_column(:nics, :primary, :boolean, {:default=>false}) > -> 0.3113s > -- add_column(:nics, :provision, :boolean, {:default=>false}) > -> 0.0135s > -- Migrating Host interfaces to standalone Interfaces > -- Migrated host1.domain.local-eth0 to nics > -- Migrated host2.domain.local-eth0 to nics > -- Migrated host3.domain.local-eth0 to nics > -- Migrated host4.domain.local-eth0 to nics > -- Migrated host5.domain.local-eth0 to nics > -- remove_column(:hosts, :ip) > -> 0.0501s > -- remove_column(:hosts, :mac) > -> 0.0364s > -- remove_column(:hosts, :primary_interface) > -> 0.3690s > -- remove_foreign_key(:hosts, {:name=>"hosts_subnet_id_fk"})


Dominic Cleal
Red Hat Engineering

Hi Dominic,

··· 2015-04-29 10:11 GMT+02:00 Dominic Cleal :

[
​…]​
The migration attempted to remove a foreign key which probably didn’t
exist. Some old MySQL DBs that have been upgraded don’t have foreign
keys in all of the places we intended, as the old database adapter we
used didn’t support them.
[
​…]​

​ok, upgrade is done. But starting the instance fail with docker plugin
error in conjunction with passenger. Deinstalling the docker plugin solved
the problem and the instance is back again (didn’t use docker yet, so no
problem). Beside this, great work!

Regards Thomas​

This seems to be an unrelated update that the foreman-docker folks put
out yesterday, version 1.3.0.

I filed Bug #10306: uninitialized constant DockerContainerWizardStates::Dns::Resolv (NameError) - Docker - Foreman for the issue,
hopefully a 1.3.1 will be released soon.

··· On 29/04/15 12:59, Thomas Bendler wrote: > Hi Dominic, > > 2015-04-29 10:11 GMT+02:00 Dominic Cleal >: > > [ > ​...]​ > The migration attempted to remove a foreign key which probably didn't > exist. Some old MySQL DBs that have been upgraded don't have foreign > keys in all of the places we intended, as the old database adapter we > used didn't support them. > [ > ​...]​ > > > ​ok, upgrade is done. But starting the instance fail with docker plugin > error in conjunction with passenger. Deinstalling the docker plugin > solved the problem and the instance is back again (didn't use docker > yet, so no problem). Beside this, great work!


Dominic Cleal
Red Hat Engineering

Foreman-docker 1.3.1 is out now, it should be safe to install again.
Thanks Dominic for the quick patch!

··· On 04/29, Dominic Cleal wrote: > On 29/04/15 12:59, Thomas Bendler wrote: > > Hi Dominic, > > > > 2015-04-29 10:11 GMT+02:00 Dominic Cleal > >: > > > > [ > > ​...]​ > > The migration attempted to remove a foreign key which probably didn't > > exist. Some old MySQL DBs that have been upgraded don't have foreign > > keys in all of the places we intended, as the old database adapter we > > used didn't support them. > > [ > > ​...]​ > > > > > > ​ok, upgrade is done. But starting the instance fail with docker plugin > > error in conjunction with passenger. Deinstalling the docker plugin > > solved the problem and the instance is back again (didn't use docker > > yet, so no problem). Beside this, great work! > > This seems to be an unrelated update that the foreman-docker folks put > out yesterday, version 1.3.0. > > I filed http://projects.theforeman.org/issues/10306 for the issue, > hopefully a 1.3.1 will be released soon. > > -- > Dominic Cleal > Red Hat Engineering > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Daniel Lobato Garcia

@eLobatoss
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato