Deployment fails when Memcached and SwiftProxy run on different nodes

Bug #1628967 reported by Marius Cornea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-swift
Fix Released
Medium
Alex Schultz
tripleo
Fix Released
Medium
Alex Schultz

Bug Description

When swift::proxy::cache is used without also including memcached in the catalog, it fails even if remote memcache server ips are provided.

Deployment fails with the following errors:

   Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-1.localdomain
    Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-1.localdomain

    Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-0.localdomain
    Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-0.localdomain

    Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-2.localdomain
    Error: Could not find resource 'Class[Memcached]' for relationship on 'Class[Swift::Proxy::Cache]' on node overcloud-serviceapi-2.localdomain

Revision history for this message
Alex Schultz (alex-schultz) wrote :

This is probably a bug in upstream since this is defined in swift::proxy::cache.

Revision history for this message
Alex Schultz (alex-schultz) wrote :

Actually, the upstream only ensures memcache if the server list includes localhost so it might be a bug in the memcache ip calculations.

https://github.com/openstack/puppet-swift/blob/master/manifests/proxy/cache.pp#L27-L30

Changed in tripleo:
status: New → Triaged
milestone: none → ocata-1
importance: Undecided → Medium
Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
Revision history for this message
Marius Cornea (mcornea) wrote :
Download full text (3.5 KiB)

Attaching the tht templates that I used. This is the deploy command:

source ~/stackrc
export THT=/home/stack/templates/tripleo-heat-templates
openstack overcloud deploy --templates $THT \
-e $THT/environments/network-isolation.yaml \
-e $THT/environments/network-management.yaml \
-e ~/templates/network-environment.yaml \
-e $THT/environments/storage-environment.yaml \
-e ~/templates/disk-layout.yaml \
-e $THT/environments/puppet-pacemaker.yaml \
--control-scale 3 \
--control-flavor controller \
--compute-scale 1 \
--compute-flavor compute \
--ceph-storage-scale 1 \
--ceph-storage-flavor ceph \
--ntp-server clock.redhat.com

and the network-environment.yaml file:

resource_registry:
  OS::TripleO::Compute::Net::SoftwareConfig: /home/stack/templates/nic-configs/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: /home/stack/templates/nic-configs/controller.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: /home/stack/templates/nic-configs/ceph-storage.yaml

  OS::TripleO::ServiceApi::Net::SoftwareConfig: /home/stack/templates/nic-configs/serviceapi.yaml
  OS::TripleO::ServiceApi: /home/stack/templates/tripleo-heat-templates/puppet/serviceapi.yaml
  OS::TripleO::ServiceApi::Ports::ExternalPort: /home/stack/templates/tripleo-heat-templates/network/ports/noop.yaml
  OS::TripleO::ServiceApi::Ports::InternalApiPort: /home/stack/templates/tripleo-heat-templates/network/ports/internal_api.yaml
  OS::TripleO::ServiceApi::Ports::StoragePort: /home/stack/templates/tripleo-heat-templates/network/ports/storage.yaml
  OS::TripleO::ServiceApi::Ports::StorageMgmtPort: /home/stack/templates/tripleo-heat-templates/network/ports/noop.yaml
  OS::TripleO::ServiceApi::Ports::TenantPort: /home/stack/templates/tripleo-heat-templates/network/ports/noop.yaml
  OS::TripleO::ServiceApi::Ports::ManagementPort: /home/stack/templates/tripleo-heat-templates/network/ports/management.yaml
  OS::TripleO::Tasks::ServiceApiPostConfig: OS::Heat::None
  OS::TripleO::Tasks::ServiceApiPreConfig: OS::Heat::None
  OS::TripleO::ServiceApiConfig: /home/stack/templates/tripleo-heat-templates/puppet/serviceapi-config.yaml

parameter_defaults:
  ServiceApiCount: 3
  OvercloudServiceApiFlavor: serviceapi
  ServiceNetMap:
    ServiceApiHostnameResolveNetwork: internal_api

  InternalApiNetCidr: 10.0.0.0/25
  InternalApiAllocationPools: [{'start': '10.0.0.10', 'end': '10.0.0.100'}]
  InternalApiNetworkVlanID: 200

  StorageNetCidr: 10.0.0.128/25
  StorageAllocationPools: [{'start': '10.0.0.138', 'end': '10.0.0.200'}]
  StorageNetworkVlanID: 300

  StorageMgmtNetCidr: 10.0.1.0/25
  StorageMgmtAllocationPools: [{'start': '10.0.1.10', 'end': '10.0.1.100'}]
  StorageMgmtNetworkVlanID: 301

  TenantNetCidr: 10.0.1.128/25
  TenantAllocationPools: [{'start': '10.0.1.138', 'end': '10.0.1.200'}]

  ManagementNetCidr: 172.16.17.128/25
  ManagementAllocationPools: [{'start': '172.16.17.160', 'end': '172.16.17.200'}]
  ManagementInterfaceDefaultRoute: 172.16.17.254

  ExternalNetCidr: 172.16.18.0/25
  ExternalAllocationPools: [{'start': '172.16.18.25', 'end': '172.16.18.100'}]
  ExternalInterfaceDefaultRoute: 172.16.18.126
  ExternalNetworkVlanID: 100

  ControlPlaneSubnetCidr: "25"
  Cont...

Read more...

Revision history for this message
Alex Schultz (alex-schultz) wrote :

Just to confirm this is an issue with the puppet module because it's not properly determining if 127.0.0.1 is in the server list.

summary: - Deployment fails when Memcached and SwiftProxy run on different roles
+ Deployment fails when Memcached and SwiftProxy run on different nodes
description: updated
Changed in puppet-swift:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (master)

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

Changed in puppet-swift:
status: Confirmed → In Progress
Changed in tripleo:
status: Triaged → In Progress
tags: added: newton-backport-potential
Changed in tripleo:
milestone: ocata-1 → newton-rc3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (master)

Reviewed: https://review.openstack.org/379796
Committed: https://git.openstack.org/cgit/openstack/puppet-swift/commit/?id=fbbcd892358d47f5734adcefd5406146a6f33d0e
Submitter: Jenkins
Branch: master

commit fbbcd892358d47f5734adcefd5406146a6f33d0e
Author: Alex Schultz <email address hidden>
Date: Thu Sep 29 14:08:07 2016 -0600

    Fixed swift::proxy::cache requirement on memcached

    Fixed the incorrect inclusion of a requirement for the memcached class
    to be in the catalog for swift::proxy::cache due to a bad grep of
    the memcached server list. The grep command will return an array of
    matching values. Unfortunately this includes if nothing is found so the
    if condition was always matching. Now if you are not using a local
    memcache server on 127.0.0.1, the memcached class is not required to
    be in the catalog.

    Change-Id: I79b92dc67e46dfa0b62ba07b00633de6fb17bf1e
    Closes-Bug: #1628967

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/380370

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

Reviewed: https://review.openstack.org/380370
Committed: https://git.openstack.org/cgit/openstack/puppet-swift/commit/?id=3ae58f377b48668d7c3e113a8cbe269f12fa2fd2
Submitter: Jenkins
Branch: stable/newton

commit 3ae58f377b48668d7c3e113a8cbe269f12fa2fd2
Author: Alex Schultz <email address hidden>
Date: Thu Sep 29 14:08:07 2016 -0600

    Fixed swift::proxy::cache requirement on memcached

    Fixed the incorrect inclusion of a requirement for the memcached class
    to be in the catalog for swift::proxy::cache due to a bad grep of
    the memcached server list. The grep command will return an array of
    matching values. Unfortunately this includes if nothing is found so the
    if condition was always matching. Now if you are not using a local
    memcache server on 127.0.0.1, the memcached class is not required to
    be in the catalog.

    Change-Id: I79b92dc67e46dfa0b62ba07b00633de6fb17bf1e
    Closes-Bug: #1628967
    (cherry picked from commit fbbcd892358d47f5734adcefd5406146a6f33d0e)

tags: added: in-stable-newton
Changed in tripleo:
status: In Progress → Fix Released
status: Fix Released → In Progress
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 9.4.1

This issue was fixed in the openstack/puppet-swift 9.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 10.0.0

This issue was fixed in the openstack/puppet-swift 10.0.0 release.

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.