Bug 1234785

Summary: Error appeared during Puppet run: 192.168.1.45_swift.pp Error: Could not find dependency Package[openstack-swift]
Product: [Fedora] Fedora Reporter: Boris Derzhavets <bderzhavets>
Component: openstack-packstackAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: apevec, dhill, gchamoul, gdubreui, ichavero, itamar, karlthered, mmagr, p, rbinkhor, social
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 19:13:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Boris Derzhavets 2015-06-23 08:57:50 UTC
Description of problem:

packstack --allinone fails on F22

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

openstack-puppet-modules-2015.1.6-2.fc23.noarch
openstack-packstack-puppet-2015.1-0.2.dev1537.gba5183c.fc23.noarch
puppet-4.1.0-1.fc22.noarch


How reproducible:

100%

Steps to Reproduce:
1. Follow RDO Quick Start page
2. packstack --allinone 
3. Apply workarounds from https://bugzilla.redhat.com/show_bug.cgi?id=1234042
if needed

Actual results:

192.168.1.45_swift.pp:                            [ ERROR ]               
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 192.168.1.45_swift.pp
Error: Could not find dependency Package[openstack-swift] for File[/srv/node] at /var/tmp/packstack/7dc52aca84534b74b5e92cdedb5ca2fc/manifests/192.168.1.45_swift.pp:90


Expected results:

192.168.1.45_swift.pp [DONE]

Additional info:

Comment 1 Boris Derzhavets 2015-06-23 13:10:23 UTC
I just updated swift_storage.pp

# install all swift storage servers together
class { '::swift::storage::all':
  storage_local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
  allow_versions       => true,
  require              => Class['swift'],
}


if (!defined(File['/srv/node'])) {
  file { '/srv/node':
    ensure  => directory,
    owner   => 'swift',
    group   => 'swift',
    # require => Package['openstack-swift'],  <=== Commented out by me
  }
}

swift::ringsync{ ['account', 'container', 'object']:
  ring_server => hiera('CONFIG_STORAGE_HOST_URL'),
  before      => Class['swift::storage::all'],
  require     => Class['swift'],
}

Immediately got :-

192.168.1.45_swift.pp:                               [ DONE ]             
192.168.1.45_provision_glance:                       [ DONE ]             
192.168.1.45_provision_demo.pp:                   [ ERROR ]               
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 192.168.1.45_provision_demo.pp
Error: Could not set 'present' on ensure: undefined local variable or method `model' for #<Puppet::Type::Neutron_network::ProviderNeutron:0x0000000444c808> at 53:/var/tmp/packstack/919d3e9e15d340bead16a30f52c66118/manifests/192.168.1.45_provision_demo.pp

Comment 2 Boris Derzhavets 2015-06-25 21:20:46 UTC
Patched provision_demo.pp as follows :-

--- ./demo_orig/provision_demo.pp	2015-06-25 20:23:51.631661771 +0300
+++ ./demo_update/provision_demo.pp	2015-06-25 20:25:31.343195583 +0300
@@ -45,51 +45,6 @@
   ## Neutron
   # IPv6 support is not yet available for public network in packstack.  It can
   # be done manually.  Here we just ensure that we don't fail.
-  if $provision_neutron_avail and $ip_version != 'ipv6' {
-    $neutron_deps = [Neutron_network[$public_network_name]]
-
-    neutron_network { $public_network_name:
-      ensure          => present,
-      router_external => true,
-      tenant_name     => $admin_tenant_name,
-    }
-    neutron_subnet { $public_subnet_name:
-      ensure       => 'present',
-      cidr         => $floating_range,
-      enable_dhcp  => false,
-      network_name => $public_network_name,
-      tenant_name  => $admin_tenant_name,
-    }
-    neutron_network { $private_network_name:
-      ensure      => present,
-      tenant_name => $tenant_name,
-    }
-    neutron_subnet { $private_subnet_name:
-      ensure       => present,
-      cidr         => $fixed_range,
-      network_name => $private_network_name,
-      tenant_name  => $tenant_name,
-    }
-    # Tenant-owned router - assumes network namespace isolation
-    neutron_router { $router_name:
-      ensure               => present,
-      tenant_name          => $tenant_name,
-      gateway_network_name => $public_network_name,
-      # A neutron_router resource must explicitly declare a dependency on
-      # the first subnet of the gateway network.
-      require              => Neutron_subnet[$public_subnet_name],
-    }
-    neutron_router_interface { "${router_name}:${private_subnet_name}":
-      ensure => present,
-    }
-
-    if $setup_ovs_bridge {
-      neutron_l3_ovs_bridge { $public_bridge_name:
-        ensure      => present,
-        subnet_name => $public_subnet_name,
-      }
-    }
-  }
 
 if $setup_ovs_bridge and $ip_version != 'ipv6' {
   firewall { '000 nat':

Set CONFIG_NAGIOS_INSTALL='n'

and completed packstack installation.

Comment 3 Boris Derzhavets 2015-06-25 21:38:15 UTC
RDO Kilo F22 spice console been connected via spicy (or virt-manager) along with
patches of Y.Kawada (virt/libvirt/config.py and driver.py) provides much better
"video/sound" synchronization then it works on CentOS 7.1. Details may seen
here :-
http://bderzhavets.blogspot.com/2015/06/enable-dashboard-spice-console-in-rdo.html

Comment 4 Boris Derzhavets 2015-06-27 12:10:58 UTC
Correct update for swift_storage.pp would be :-

# install all swift storage servers together
class { '::swift::storage::all':
  storage_local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
  allow_versions       => true,
  require              => Class['swift'],
}


if (!defined(File['/srv/node'])) {
  file { '/srv/node':
    ensure  => directory,
    owner   => 'swift',
    group   => 'swift',
    require => Package['swift'],  
  }
}

swift::ringsync{ ['account', 'container', 'object']:
  ring_server => hiera('CONFIG_STORAGE_HOST_URL'),
  before      => Class['swift::storage::all'],
  require     => Class['swift'],
}

Comment 5 David Hill 2015-07-10 15:48:41 UTC
I doubt that the patch for swift is the proper one to use...   It may be an include ordering issue where the require Package appears before the package installation within puppet.  The proper package to install is openstack-swift ...

Comment 6 David Hill 2015-07-10 15:59:43 UTC
# install all swift storage servers together
class { '::swift::storage::all':
  storage_local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
  allow_versions       => true,
  require              => Class['swift'],
}


if (!defined(File['/srv/node'])) {
  package { 'oepnstack-swift': ensure => present }
  file { '/srv/node':
    ensure  => directory,
    owner   => 'swift',
    group   => 'swift',
    require => Package['swift'],  
  }
}

swift::ringsync{ ['account', 'container', 'object']:
  ring_server => hiera('CONFIG_STORAGE_HOST_URL'),
  before      => Class['swift::storage::all'],
  require     => Class['swift'],
}

Comment 7 David Hill 2015-07-10 16:23:39 UTC
# install all swift storage servers together
class { '::swift::storage::all':
  storage_local_net_ip => hiera('CONFIG_STORAGE_HOST_URL'),
  allow_versions       => true,
  require              => Class['swift'],
}


if (!defined(File['/srv/node'])) {
  package { 'oepnstack-swift': ensure => present }
  file { '/srv/node':
    ensure  => directory,
    owner   => 'swift',
    group   => 'swift',
    require => Package['openstack-swift'],  
  }
}

swift::ringsync{ ['account', 'container', 'object']:
  ring_server => hiera('CONFIG_STORAGE_HOST_URL'),
  before      => Class['swift::storage::all'],
  require     => Class['swift'],
}

Comment 8 David Hill 2015-07-10 16:34:10 UTC
As for the provision demo bug, you can call packstack with --provision-demo=n ...

Comment 9 Boris Derzhavets 2015-07-11 06:53:22 UTC
Via Fedora Rawhide in meantime :-

[root@fedora22server templates]# pwd
/usr/lib/python2.7/site-packages/packstack/puppet/templates

[root@fedora22server templates]# rpm -qa \*puppet\*
openstack-packstack-puppet-2015.1-0.7.dev1577.gc9f8c3c.fc23.noarch
openstack-puppet-modules-2015.1.6-2.fc23.noarch
puppet-4.1.0-1.fc22.noarch

Version openstack-packstack-puppet-2015.1-0.8 does the same :-

[root@fedora22server templates]# cat  swift_storage.pp

# install all swift storage servers together
class { '::swift::storage::all':
  # looks like ipv6 address without brackets is required here
  storage_local_net_ip => hiera('CONFIG_STORAGE_HOST'),
  allow_versions       => true,
  require              => Class['swift'],
}

if (!defined(File['/srv/node'])) {
  file { '/srv/node':
    ensure  => directory,
    owner   => 'swift',
    group   => 'swift',
    require => Package['swift'],
  }
}

swift::ringsync{ ['account', 'container', 'object']:
  ring_server => hiera('CONFIG_STORAGE_HOST_URL'),
  before      => Class['swift::storage::all'],
  require     => Class['swift'],

Comment 10 David Hill 2015-07-13 16:55:51 UTC
But the package that has to be installed is openstack-swift... isn't it?

Comment 11 Boris Derzhavets 2015-07-13 17:51:59 UTC
Yes, it is.

Comment 12 Fedora Admin XMLRPC Client 2016-02-17 15:06:06 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Fedora End Of Life 2016-07-19 19:13:03 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.