Catalog compilation failed sometimes

Bug #1403480 reported by Vyacheslav Struk
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet-vswitch
Fix Released
High
Alex Schultz

Bug Description

Catalog compilation fails with:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/vs_port: Could not autoload puppet/provider/vs_port/ovs_redhat_el6: Could not find parent provider ovs_redhat of ovs_redhat_el6 on node <fqdn here>
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Sometimes puppet run ends-up successfully with just the same config, so it looks like a kind of race condition.
Both ovs_redhat_el6.rb and ovs_redhat.rb are present on a client and they are equal to server's files.
Puppet version is 3.6.2, module is from a master branch.

Revision history for this message
Ben Morrice (ben-morrice) wrote :

I am also experiencing the the same behaviour listed here. I am running on RHEL7 with 2 physical NICs bonded with OVS, and a bridge on top. The module works fine on RHEL6 with the same configuration, though not in RHEL7. Puppet agent and master are 3.8.1

I am using the puppet-vswitch master branch.

# cat ifcfg-bond0
NAME=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=OVSBond
DEVICETYPE=ovs
OVS_BRIDGE=br-bond0
BOND_IFACES="enp2s0f0 enp2s0f1"
OVS_OPTIONS="lacp=passive bond_mode=balance-tcp"
NM_CONTROLLED=no
# puppet agent -td
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/type/vs_port: Could not autoload puppet/provider/vs_port/ovs_redhat_el6: Could not find parent provider ovs_redhat of ovs_redhat_el6 on node <fqdn>

I have had the catalog compile successfully without changing any other code, the vast majority of the time though indicates the above failure.

Changed in puppet-vswitch:
status: New → Triaged
importance: Undecided → High
Revision history for this message
David Hill (david-hill-ubisoft) wrote :

I got the same issue on Fedora 22.

Revision history for this message
Ben Morrice (ben-morrice) wrote :

Hi all
Just wanted to add some more details of my environment to assist with anyone looking at this bug.

[root@host network-scripts]# ovs-vsctl show
f329ec06-53cc-402f-b92a-5714910d5145
    Bridge br-int
        fail_mode: secure
        Port "int-br-bond0"
            Interface "int-br-bond0"
        Port br-int
            Interface br-int
                type: internal
    Bridge "br-bond0"
        Port "phy-br-bond0"
            Interface "phy-br-bond0"
        Port "br-bond0"
            Interface "br-bond0"
                type: internal
        Port "bond0"
            Interface "enp2s0f0"
            Interface "enp2s0f1"
    ovs_version: "2.1.3"
[root@host network-scripts]# ls -l ifcfg-*
-rw-r--r-- 1 root root 196 Jul 27 11:29 ifcfg-bond0
-rw-r--r-- 1 root root 218 May 21 08:15 ifcfg-br-bond0
-rw-r--r-- 1 root root 95 Jul 27 11:29 ifcfg-enp2s0f0
-rw-r--r-- 1 root root 95 Jul 27 11:29 ifcfg-enp2s0f1
-rw-r--r--. 1 root root 254 Jan 15 2015 ifcfg-lo
[root@host network-scripts]# cat ifcfg-enp2s0f0
BOOTPROTO=none
NAME=enp2s0f0
DEVICE=enp2s0f0
ONBOOT=yes
USERCTL=no
HOTPLUG=no
NM_CONTROLLED=no
[root@host network-scripts]# cat ifcfg-enp2s0f1
BOOTPROTO=none
NAME=enp2s0f1
DEVICE=enp2s0f1
ONBOOT=yes
USERCTL=no
HOTPLUG=no
NM_CONTROLLED=no
[root@host network-scripts]# cat ifcfg-br-bond0
DEVICE=br-bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.80.11.20
NETMASK=255.255.255.0
GATEWAY=10.80.11.1
DNS1=1.2.3.4
DNS2=1.2.3.5
STP=off
NM_CONTROLLED=no
HOTPLUG=no
DEVICETYPE=ovs
TYPE=OVSBridge
PEERDNS=yes
[root@host network-scripts]# cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=OVSBond
DEVICETYPE=ovs
OVS_BRIDGE=br-bond0
BOND_IFACES='enp2s0f0 enp2s0f1'
OVS_OPTIONS='lacp=passive bond_mode=balance-tcp'
NM_CONTROLLED=no
[root@host network-scripts]#

Revision history for this message
Ben Morrice (ben-morrice) wrote :

Hi all,

Hacking the ovs_redhat_el6.rb file as referenced here https://bugzilla.redhat.com/show_bug.cgi?id=1234042 fixes the issue

The changes required are:
modules/vswitch/lib/puppet/provider/vs_port$ diff /tmp/upstream_ovs_redhat_el6.rb ovs_redhat_el6.rb
0a1
> require File.expand_path(File.join(File.dirname(__FILE__), '.','ovs_redhat.rb'))

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-vswitch (master)

Fix proposed to branch: master
Review: https://review.openstack.org/220316

Changed in puppet-vswitch:
assignee: nobody → Alex Schultz (alex-schultz)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-vswitch (master)

Reviewed: https://review.openstack.org/220316
Committed: https://git.openstack.org/cgit/openstack/puppet-vswitch/commit/?id=a0cc00d98e833dd905aaa291dd2bd1fa443d8455
Submitter: Jenkins
Branch: master

commit a0cc00d98e833dd905aaa291dd2bd1fa443d8455
Author: Alex Schultz <email address hidden>
Date: Thu Sep 3 16:10:54 2015 -0500

    Add require ovs_redhat.rb to ovs_redhat_el6.rb

    This change adds an explicit require of ovs_redhat.rb to the
    ovs_redhat_el6 provider to address possible compilation errors when
    the ovs_redhat provider was not loaded before the el6 version.

    Change-Id: I98a8eb8828bdbfe71005eccfc8d258f9487720ee
    Closes-Bug: 1403480

Changed in puppet-vswitch:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-vswitch (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/278560

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-vswitch (stable/kilo)

Reviewed: https://review.openstack.org/278560
Committed: https://git.openstack.org/cgit/openstack/puppet-vswitch/commit/?id=2da138c277f97959bd1b06a024e226d31439aebf
Submitter: Jenkins
Branch: stable/kilo

commit 2da138c277f97959bd1b06a024e226d31439aebf
Author: Alex Schultz <email address hidden>
Date: Thu Sep 3 16:10:54 2015 -0500

    Add require ovs_redhat.rb to ovs_redhat_el6.rb

    This change adds an explicit require of ovs_redhat.rb to the
    ovs_redhat_el6 provider to address possible compilation errors when
    the ovs_redhat provider was not loaded before the el6 version.

    Change-Id: I98a8eb8828bdbfe71005eccfc8d258f9487720ee
    Closes-Bug: 1403480
    (cherry picked from commit a0cc00d98e833dd905aaa291dd2bd1fa443d8455)

tags: added: in-stable-kilo
Cody Herriges (ody-cat)
Changed in puppet-vswitch:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.