Bug 822274 - sharded candlepins should not run with different candlepin.standalone configurations
sharded candlepins should not run with different candlepin.standalone configu...
Status: CLOSED WONTFIX
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Bryan Kearney
Eric Sammons
:
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-05-16 18:03 EDT by John Sefler
Modified: 2013-01-10 06:01 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-22 09:33:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-05-16 18:03:41 EDT
Description of problem:
The default value for /etc/candlepin/candlepin.conf candlepin.standalone=true.  However, in the hosted IT-Candlepin environment where sharded candlepins are deployed, they need to be configured with candlepin.standalone=false.

Today, our automated virtualization tests caught a situation where both a derived subpool was generated based on virt_limit (the original virt model used when candlepin.standalone=false) and a derived pool created after consuming on the host (the new virt model that maintains the host-to-guest coupling used when candlepin.standalone=true).  Hence the stage environment was running a mixture of sharded candlepins.  That's bad.

If there is a way to safeguard this situation, then use this bug to fix it.

jbowes suggested a possible solution could be to store the standalone setting in the candlepin db, and if any sharded candlepin sees a setting in the db that doesn't match their config, then retreat!

Version-Release number of selected component (if applicable):
candlepin-it-jars: 0.5.26.1-1
candlepin-jboss: 0.5.26.3-1.el6_2



Additional Info:

The following comments are listings of the three json pools that I found running simultaneously under owner 6605526 accessible by stage_test_12 that caused the automated test to failure...

Pool 1 and 2 are ok (from candlepin.standalone=false)
Pool 1 and 3 are ok (from candlepin.standalone=true)
Pool 1, 2, and 3 are not ok
Comment 1 John Sefler 2012-05-16 18:04:22 EDT
{
  "startDate": "2012-04-27T04:00:00.000+0000",
  "restrictedToUsername": null,
  "subscriptionSubKey": "master",
  "exported": 0,
  "endDate": "2013-04-27T03:59:59.000+0000",
  "productAttributes": [
    {
      "id": "8a99f981370984da01370986406e0024",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "variant",
      "value": "Server",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e0025",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "support_type",
      "value": "L1-L3",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e0028",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "sockets",
      "value": "8",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e0027",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "enabled_consumer_types",
      "value": "sam",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e0026",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "arch",
      "value": "x86_64,ia64,x86",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e0029",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "virt_limit",
      "value": "4",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e002a",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "name",
      "value": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e002b",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "type",
      "value": "MKT",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406e002c",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "description",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406f002e",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "product_family",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406f002d",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "option_code",
      "value": "1",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da01370986406f002f",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "support_level",
      "value": "PREMIUM",
      "productId": "RH0103708"
    }
  ],
  "sourceEntitlement": null,
  "subscriptionId": "2492565",
  "providedProducts": [
    {
      "id": "8a99f981370984da01370986406f0030",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "productName": "Red Hat Enterprise Linux Server",
      "productId": "69"
    }
  ],
  "productId": "RH0103708",
  "id": "8a99f981370984da01370986406e0023",
  "activeSubscription": true,
  "accountNumber": "1580759",
  "consumed": 13,
  "created": "2012-05-01T17:50:22.000+0000",
  "updated": "2012-05-16T18:48:30.000+0000",
  "owner": {
    "id": "8a99f981370984da0137098639790022",
    "displayName": "Anonymous User",
    "href": "/owners/6605526",
    "key": "6605526"
  },
  "quantity": 100,
  "attributes": [
    
  ],
  "href": "/pools/8a99f981370984da01370986406e0023",
  "productName": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
  "contractNumber": "3019906"
}
Comment 2 John Sefler 2012-05-16 18:04:48 EDT
{
  "startDate": "2012-04-27T04:00:00.000+0000",
  "restrictedToUsername": null,
  "subscriptionSubKey": "derived",
  "exported": 0,
  "endDate": "2013-04-27T03:59:59.000+0000",
  "productAttributes": [
    {
      "id": "8a99f981370984da0137098640900036",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "variant",
      "value": "Server",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da0137098640900037",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "support_type",
      "value": "L1-L3",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003a",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "sockets",
      "value": "8",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da0137098640910039",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "enabled_consumer_types",
      "value": "sam",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da0137098640910038",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "arch",
      "value": "x86_64,ia64,x86",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003b",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "virt_limit",
      "value": "4",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003c",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "name",
      "value": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003d",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "type",
      "value": "MKT",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003e",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "description",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da0137098640910040",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "product_family",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da013709864091003f",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "option_code",
      "value": "1",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f981370984da0137098640910041",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "support_level",
      "value": "PREMIUM",
      "productId": "RH0103708"
    }
  ],
  "sourceEntitlement": null,
  "subscriptionId": "2492565",
  "providedProducts": [
    {
      "id": "8a99f981370984da0137098640910042",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "productName": "Red Hat Enterprise Linux Server",
      "productId": "69"
    }
  ],
  "productId": "RH0103708",
  "id": "8a99f981370984da0137098640900031",
  "activeSubscription": true,
  "accountNumber": "1580759",
  "consumed": 9,
  "created": "2012-05-01T17:50:22.000+0000",
  "updated": "2012-05-16T14:29:12.000+0000",
  "owner": {
    "id": "8a99f981370984da0137098639790022",
    "displayName": "Anonymous User",
    "href": "/owners/6605526",
    "key": "6605526"
  },
  "quantity": 400,
  "attributes": [
    {
      "id": "8a99f981370984da0137098640900032",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "requires_consumer_type",
      "value": "system"
    },
    {
      "id": "8a99f981370984da0137098640900033",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "virt_limit",
      "value": "0"
    },
    {
      "id": "8a99f981370984da0137098640900035",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "pool_derived",
      "value": "true"
    },
    {
      "id": "8a99f981370984da0137098640900034",
      "created": "2012-05-01T17:50:22.000+0000",
      "updated": "2012-05-01T17:50:22.000+0000",
      "name": "virt_only",
      "value": "true"
    }
  ],
  "href": "/pools/8a99f981370984da0137098640900031",
  "productName": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
  "contractNumber": "3019906"
}
Comment 3 John Sefler 2012-05-16 18:05:21 EDT
{
  "startDate": "2012-04-27T04:00:00.000+0000",
  "restrictedToUsername": null,
  "subscriptionSubKey": null,
  "exported": 0,
  "endDate": "2013-04-27T03:59:59.000+0000",
  "productAttributes": [
    {
      "id": "8a99f984374cc15b01374ff766460a0c",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "variant",
      "value": "Server",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a0d",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "support_type",
      "value": "L1-L3",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a10",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "sockets",
      "value": "8",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a0f",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "enabled_consumer_types",
      "value": "sam",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a0e",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "arch",
      "value": "x86_64,ia64,x86",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a11",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "virt_limit",
      "value": "4",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a12",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "name",
      "value": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a13",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "type",
      "value": "MKT",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a14",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "description",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a16",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "product_family",
      "value": "Red Hat Enterprise Linux",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a15",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "option_code",
      "value": "1",
      "productId": "RH0103708"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a17",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "support_level",
      "value": "PREMIUM",
      "productId": "RH0103708"
    }
  ],
  "sourceEntitlement": {
    "id": "8a99f984374cc15b01374ff766460a19",
    "href": "/entitlements/8a99f984374cc15b01374ff766460a19"
  },
  "subscriptionId": "2492565",
  "providedProducts": [
    {
      "id": "8a99f984374cc15b01374ff766460a18",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "productName": "Red Hat Enterprise Linux Server",
      "productId": "69"
    }
  ],
  "productId": "RH0103708",
  "id": "8a99f984374cc15b01374ff766460a06",
  "activeSubscription": true,
  "accountNumber": "1580759",
  "consumed": 1,
  "created": "2012-05-15T10:07:22.000+0000",
  "updated": "2012-05-16T13:30:16.000+0000",
  "owner": {
    "id": "8a99f981370984da0137098639790022",
    "displayName": "Anonymous User",
    "href": "/owners/6605526",
    "key": "6605526"
  },
  "quantity": 4,
  "attributes": [
    {
      "id": "8a99f984374cc15b01374ff766460a07",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "requires_consumer_type",
      "value": "system"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a08",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "source_pool_id",
      "value": "8a99f981370984da01370986406e0023"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a09",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "requires_host",
      "value": "0bbd9343-a118-4fc0-938f-ffca5f84baac"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a0b",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "pool_derived",
      "value": "true"
    },
    {
      "id": "8a99f984374cc15b01374ff766460a0a",
      "created": "2012-05-15T10:07:22.000+0000",
      "updated": "2012-05-15T10:07:22.000+0000",
      "name": "virt_only",
      "value": "true"
    }
  ],
  "href": "/pools/8a99f984374cc15b01374ff766460a06",
  "productName": "Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)",
  "contractNumber": "3019906"
}
Comment 4 James Bowes 2012-08-22 09:33:59 EDT
We have decided that given the limited use of this (hosted only), and that it should be really solved with proper config management (puppet, which is already in place), it's not worth special casing in candlepin. closing.

Note You need to log in before you can comment on or make changes to this bug.