code removal
by Miroslav Suchý
I'm ranting in:
https://bugzilla.redhat.com/show_bug.cgi?id=656968
about duplicate code in subscription-manager. To be constructive I'm
sending you few patches.
And when I used that pylint I removed few dead lines of code.
See attachments.
--
Miroslav Suchy
Red Hat Satellite Engineering
12 years, 9 months
Supported Feature Checking Proposal
by Devan Goodwin
Not much new here, just chatting with Dmitri today about how we can
have subscription-manager check if the server it's registered against
supports things like environments and package profiles. Proposal is to
use the same partial HATEOAS stuff we already implemented in
Candlepin:
curl -k -u testuser1:password https://localhost:8443/candlepin/
Returns something like:
[ {
"rel" : "admin",
"href" : "/admin"
}, {
"rel" : "users",
"href" : "/users"
}, {
"rel" : "atom",
"href" : "/atom"
}, {
"rel" : "serials",
"href" : "/serials"
}, {
"rel" : "consumers",
"href" : "/consumers"
}, {
...
Package profile support implies the use of a top level package
resource, which Katello already has, and Candlepin does not. Similar
for environments. In our case the JSON returned above would not have
packages or environments listed, and Katello would.
Dmitri is ok with this format we're using to return the links and is
going to ask about adding a backlog item to support the same response
type in Katello.
This is rather simple and HATEOASy, resource discovery as a way to
determine what features are supported. Seem ok?
Thanks,
Devan
--
Devan Goodwin <dgoodwin(a)rm-rf.ca>
http://rm-rf.ca
12 years, 9 months
Registering a system to Katello
by Lukas Zapletal
Hello,
I am trying to register a system using subscription manager to Katello
instance, but I am not sure which certificate to overwrite in the
/etc/rhsm directory.
Suppose I have a ca.crt file (and ca.key) that is used by the Katello
instance and also I have generated a client.crt signed by this ca.crt.
What certificate should I put and where? I did several tries without
much luck (verification failed). It is loading many certificates and I
am confused which one is the one I need.
http://lzap.pastebin.com/491fM2kX
Thanks.
--
Later,
Lukas "lzap" Zapletal
12 years, 9 months
occasional failing specs
by James Bowes
Hey all:
Here are the specs I see failing from time to time:
Job Status should only find jobs with the correct owner key
gets an ISE on cleanup during owner delete; cp_owner still referenced
by cp_pool
Modifier Entitlement does not include modifier content sets consumer
should not have access to
gets an ISE on create_product() due to duplicate product name
Feel free to dig in! I'm burnt out on spec chasing for now ;)
-James
12 years, 9 months
Activate Resource URL
by Devan Goodwin
Could we move this off of /activate and merge with /consumers. An
activate is not really a resource and probably doesn't belong on the
top level. It's also really similar to regular consumer registration,
so I was wondering if we could go to POST /consumers and pass the
activation keys as a query param, the same way we specify an owner
currently. (and have the code do the needful depending on the params
given)
Dmitri was requesting yesterday we move registration to
/owners/{key}/consumers, but with this owner-less activation key
registration, we should probably leave it at /consumers for now?
Thoughts?
Thanks,
Devan
--
Devan Goodwin <dgoodwin(a)rm-rf.ca>
http://rm-rf.ca
12 years, 9 months
Quick Roles / Permissions Sanity Check
by Devan Goodwin
Here is my current plan for refactoring and modelling the role to user
and role to permission relationships as resources themselves.
- Create a role with POST /roles (json blob containing not much more
than a name) Calls UserServiceAdapter.createRole which returns a role
with a unique ID.
- Add a user to a role: POST /memberships with JSON containing just a
username and a role ID. Calls UserServiceAdapter.createMembership()
and returns a membership with a unique ID.
- Delete a user from a role: DEL /memberships/membershipid. Calls
UserServiceAdapter.deleteMembership().
- Add a permission to a role: POST /permissions with JSON containing
role ID, owner key, and access type. Calls
UserServiceAdapter.createPermission().
- Delete a permission from a role: DEL /permissions/permissionId.
Calls UserServiceAdapter.deletePermission().
All three objects, Roles, Permissions, and Memberships, fall into the
category of objects we already have which should never be directly
queried from a curator in our code base, but rather obtained through
the UserServiceAdatper.
Seem ok? I can elaborate on alternative approaches but at this point
in time it seems like clarity and decisiveness is probably best. :)
Cheers,
Devan
12 years, 9 months
tricky spec failure
by James Bowes
Hey all:
For the past few days I've been trying to track down the spec test
failure in " Entitlements should bypasses rules for "candlepin"
consumers"
I've been able to reliably reproduce this failure, but only on a full
run of 'buildr spec' (not limiting just to that test or that spec file),
and only right after a full deploy with GENDB=1 and TESTDATA=1. When I
run a second time, it passes.
The direct cause of the failure is an ISE when attempting to bind by
product, from not finding an entitlement that grants the provided
product id.
Now, there should be an entitlement that grants the requested product,
but it never appears because refresh pools is failing. I haven't yet
tracked the original cause of this failure, but it never gets reported
to the client (who just assumes the refresh passed, and continues
along). Even more interestingly, it seems as if the job keeps getting
run by pinsetter.
I've tracked down the commit where this first starts happening,
1ce24a780... which is just an addition of more test data. I've got no
idea why it would cause this.
My suspicion is that this is some really nasty bug in refresh pools, so
I'm going to keep digging. If anyone has any ideas, let me know :)
In addition, it would be good to fix the ISE from bind by product, and
to communicate the refresh pools failure in the job status.
-James
12 years, 9 months
The spec file for candlepin
by Bryan Kearney
The spec file for candlepin references the distribution in the release
Release: 1%{?dist}
This is messing up the status reporting since this is not replaced until
build time. I have not seen other products use this. Any issue with
removing and just making it a number?
-- bk
12 years, 9 months