Candlepin 0.5.5 released

Candlepin

It’s that time again, another release of Candlepin and associated projects available for your enjoyment. With this release we have subscription-manager in Fedora as well as a debut build of Thumbslug.

For more information on Candlepin, please visit: http://candlepinproject.org/

Features & Enhancements

subscription-manager

  • added support for host registration and guest association when host can not register itself
  • virt-who work to handle ESX guests
  • subscription-manager available in fedora

candlepin

  • build modified to use the tito hotness instead of bunch of disjoint bash scripts
  • disable manifest rules import
  • added support for host registration and guest association when host can not register itself

thumbslug

  • added appropriate init scripts to run as a service
  • uses Candlepin CRL
  • thumbslug talks to akamai
  • created puppet module for katello

Bugs fixed

subscription-manager

705883 Fix error dialog modal issues.
719743 Improved text output for successful pool subscription
740788 Getting error with quantity subscribe using subscription-assistance page.
746259 Don’t allow the user to pass in an empty string as an activation key
746732 Only use fallback locales for dates we need to parse
749332 Normalize the error messages for not being registered
749636 Client should not support users entering activation keys and existing consumer ids
752572 add interval logging statements back in on rhsmcertd startup
753093 The available subscriptions count does not show correctly in Subscription Manager GUI
754821 Default org of “Unknown” was not marked for gettext
755031 Unregister before attempting to run a second registration
755035 Migration script should work on RHEL 5.7 and up.
755130 add extra whitespace to classic warning
755541 Enhanced the message in the katello plugin to debug when the backend system does not support environments.
756173 Unexpected behavior change in subscription-manager unregister
756507 do not use output from “getlocale” as input for “setlocale”
758471 install-num-migrate-to-rhsm threw traceback when no instnum was found.
759199 rhsmcertd is logging the wrong value for certFrequency

candlepin

753093 The Available Subscriptions count do not show correctly in Subscription Manager GUI
754841 Implement DELETE /pools/id.
754843 Fix legacy virt bonus pools missing pool_derived.
755677 Activation Keys should not check quantity on unlimited pools
756628 Translate missing rule errors.
758462 ensure job detail isn’t null, skip it.

thumbslug

759607 update url for subscriptions handler

Download & Setup

Make sure you read over the Candlepin Setup Guide, which is located at https://fedorahosted.org/candlepin/wiki/Setup.

As well as the Headpin Install Guide which can be found at https://fedorahosted.org/candlepin/wiki/headpin/Install

Just give me the bits already! You can get the various bits at the urls below.

Candlepin:
http://repos.fedorapeople.org/repos/candlepin/candlepin/

Thumbslug:
http://repos.fedorapeople.org/repos/candlepin/thumbslug/

Headpin:
http://repos.fedorapeople.org/repos/katello

Subscription Manager:
http://repos.fedorapeople.org/repos/candlepin/subscription-manager/

Candlepin 0.4.16 released.

Another sprint gone by and another release of Candlepin for your enjoyment. Candlepin 0.4.16 is ready. You can get the bits at:

http://repos.fedorapeople.org/repos/candlepin/candlepin/

Make sure you read over the Setup Guide, which is located at
https://fedorahosted.org/candlepin/wiki/Setup

For more information on Candlepin, please visit our project page.

Features & Enhancements

client

  • A number of GUI changes
    • Center the machine type column header
    • Move quantity column to the end
    • Center the Arch column header
    • Center tree view table properties
    • Add ‘* Click to Adjust Quantity’ label to places allowing editable subscription quantity
    • New icons for red/green
    • Add virt_only attribute to subscription detail pane
    • Display subscription assistant’s subscriptions as a tree
    • Double click or button press (enter, return, space) on row will expand/collapse row
    • Update to All Available Subscriptions tab to put stacked subscriptions under parent node
    • Moved multi-entitlement column (*) next to the quantity column
    • Made the contract selector a little wider so all columns were visible (no manual resize)
  • Initial work done for the healing feature
    • Changes to rhsmcertd to support healing frequency (part I)
    • Add autoheal option to certmgr.py
    • Only autoheal when required
    • Use server-side consumer autoheal flag
  • Misc items
    • Update the strings and the remote server location
    • Make “make stylish” run all the checks, make whitespace “pop”
    • Update translations
    • managerlib was expecting a single ent_cert, but we return a list
    • Add a “refresh” method to cert_sorter
    • Add a require_connection callback to commands

server

  • upgraded to RESTEasy 2.2.1GA
  • export virt entitlements to non-candlepin consumers
  • refactored pinsetter to work in clustering mode
  • add new api to query jobs by owner, principal, consumer uuid

Bugs fixed

707641 CLI auto-subscribe tries to re-use basic auth credentials
712047 yum prints non-error messages when running in quiet mode
718052 Remove owner from consumer resource return codes. Only use the term org.
730020 Change the help text to show that config can list or set changes
731577 API to query jobs by owner, principal, consumer uuid.
731996 SQL Error when using REST query for events
732538 Disallow the relationship between a ‘person’ pool and an activation key
734174 Add missing produces annotations for role resource.
734880 Handle bundled certs in the installed produict status.
734606 ImportFileExtractor now creates cert/key files based on serial number of the cert
735087 If quartz is in clustered mode, we shouldn’t schedule any jobs.
735226 Importing should fail without a valid key and cert
735338 Subscription Manager CLI tool does not allow unsubscribe when not registered.
735695 add support for multiple config “–remove” options via cli
736166 move certs from subscription-manager to python-rhsm
736784 config –remove add config property to rhsm.conf if it doesn’t exist.
737841 Handle dates beyond 2038 on 32-bit systems.

Candlepin 0.4.11 released

Candlepin 0.4.11 has been released. You can get the bits at:

http://repos.fedorapeople.org/repos/candlepin/candlepin/

Make sure you read over the Setup Guide, which is located at
https://fedorahosted.org/candlepin/wiki/Setup

For more information on Candlepin, please visit our project page.

Features & Enhancements

client

  • group subscriptions based on stacking attribute in the following screens:
    • subscriptions page
    • compliance assistant
    • view available subscription page
  • the cli and gui now denote the state of the subscription: Subscribed, Partially Subscribed, Expired or Not Subscribed.
  • Nag messages now denote the ‘Partially Subscribed’ state.
  • registration with multiple activation keys now supported
  • list --available now shows if a subscription is multi-entitle capable
  • GUI shows an asterisk to denote a subscription is multi-entitle capable
  • config command added to cli enabling editing of the configuration values
  • client tries to optionally heal the system to keep it properly subscribed.

server

  • the list of consumer’s installed product IDs are now stored
  • the candlepin job status stable now stores the consumer uuid for async bind.
  • configuration added to disable batch jobs on a particular node
  • Moved the translations to fedora.zanata.org

Bugs fixed

729780 non-existent secure objects throw a 404 instead of a 403.
708058 Server 500 error thrown when user auto-subscribes and has no entitlements
728622 Inconsistent enable config entries
728624 Activation keys are successfully being created with invalid chars
728636 Duplicate activation key error is hard to decipher
729125 Adding pools to an activation key should fail when quantity totalQuantity for a multi-entitlement pool
729070 Adding pools to an activation key should be blocked when specifying a quantity>1 for a non-multi-entitlement pool
728721 NullPointerException thrown when registering with an activation key bound to a pool that requires_consumer_type person.
729066 remove logging statement to avoid filling up logs.

Is all this really necessary?

Apparently maven clean is a lot more than rm -rf target/.

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - foo:foo:jar:1.0.37
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
       
Downloading: http://repo1.maven.org/maven2/org/apache/maven/maven-project/2.0/maven-project-2.0.pom
      
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-profile/2.0/maven-profile-2.0.pom
1K downloaded  (maven-profile-2.0.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-model/2.0/maven-model-2.0.pom
2K downloaded  (maven-model-2.0.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.pom
1K downloaded  (maven-artifact-manager-2.0.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.pom
1K downloaded  (maven-repository-metadata-2.0.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.pom
4K downloaded  (wagon-provider-api-1.0-alpha-5.pom)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/file-management/1.2/file-management-1.2.pom
      
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-shared-components/8/maven-shared-components-8.pom
      
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.pom
3K downloaded  (maven-shared-io-1.1.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-artifact/2.0.2/maven-artifact-2.0.2.pom
765b downloaded  (maven-artifact-2.0.2.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven/2.0.2/maven-2.0.2.pom
12K downloaded  (maven-2.0.2.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/maven-artifact-manager/2.0.2/maven-artifact-manager-2.0.2.pom
1K downloaded  (maven-artifact-manager-2.0.2.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/wagon/wagon-provider-api/1.0-alpha-6/wagon-provider-api-1.0-alpha-6.pom
588b downloaded  (wagon-provider-api-1.0-alpha-6.pom)
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/wagon/wagon/1.0-alpha-6/wagon-1.0-alpha-6.pom
6K downloaded  (wagon-1.0-alpha-6.pom)
Downloading: http://www.ibiblio.org/maven2//org/codehaus/plexus/plexus-utils/1.4.6/plexus-utils-1.4.6.pom
2K downloaded  (plexus-utils-1.4.6.pom)
Downloading: http://www.ibiblio.org/maven2//org/codehaus/plexus/plexus-container-default/1.0-alpha-9/plexus-container-default-1.0-alpha-9.pom
1K downloaded  (plexus-container-default-1.0-alpha-9.pom)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom
     
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/file-management/1.2/file-management-1.2.jar
        
       
Downloading: http://www.ibiblio.org/maven2//org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
38K downloaded  (maven-shared-io-1.1.jar)
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /home/joedeveloper/dev/foo/target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Mon Oct 04 13:24:00 EDT 2010
[INFO] Final Memory: 8M/76M
[INFO] ------------------------------------------------------------------------

Cause for aneurysm

I think working with maven is going to give me an aneurysm. Say you want to compile your code for Java 1.6. Seems like a simple task. In most build systems it is actually trivial, except in maven.

In ant, you add two attributes to the javac tag.

<javac destdir="${target.dir}/classes"
           ...
           source="1.6"
           target="1.6"
           ...>

In buildr, it’s even simpler.

compile.options.target = '1.6'

But what about maven you ask? Yes you knew it was coming. It’s
completely obnoxious what you have to do.

  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

pom.xml files are just painful. Maven I hate you.

buildr > ant > maven

I chose buildr as our build tool for project candlepin, primarily because I don’t care for the large amounts of XML required by maven pom files. And ant seems to have become passe with most Java projects.

On project Spacewalk, we used checkstyle to ensure the code was consistently formatted, so I wanted to do this with candlepin as well. At the moment, there isn’t an official checkstyle plugin for buildr, but it has the ability to create ant tasks (in Ruby). Here is my task to run checkstyle against the candlepin codebase.

  #
  # CHECKSTYLE task, a Buildr plugin would be better, but this is faster
  #
  task :checkstyle do
    begin
      ant('checkstyle') do |ant|
        rm_rf 'reports/checkstyle_report.xml'
        mkdir_p 'reports'

        ant.taskdef :resource=>"checkstyletask.properties", :classpath=>Buildr.artifacts(CHECKSTYLE).each(&:invoke).map(&:name).join(File::PATH_SEPARATOR)
        ant.checkstyle :config=>"buildconf/checkstyle.xml" do
          ant.formatter :type=>'plain'
          ant.formatter :type=>'xml', :toFile=>"reports/checkstyle_report.xml"

          ant.property :key=>'javadoc.method.scope', :value=>'public'
          ant.property :key=>'javadoc.type.scope', :value=>'package'
          ant.property :key=>'javadoc.var.scope', :value=>'package'
          ant.property :key=>'javadoc.lazy', :value=>'false'
          ant.property :key=>'checkstyle.cache.file', :value=>'target/checkstyle.cache.src'
          ant.property :key=>'checkstyle.header.file', :value=>'buildconf/LICENSE.txt'

          ant.fileset :dir=>"src/main/java", :includes=>'**/*.java'
        end
      end
    end
  end

Notice the lack of XML :) that’s my favorite part. I think a better integration would be to write a plugin for buildr, but for now this will suffice. Now to go fix all 800 checkstyle errors I found.

can I have a do over?

The next webapp I write, I think I’m going with some of the new hotness: NoSQL datastore, RESTful API, and Ruby. On a recent project I chose to use a RESTful API which I really like, but it definitely changes how you think of things coming from the XML-RPC way of doing APIs, but I still like its simplicity.

Unfortunately, I went with Java as the implementation instead of something like python or Ruby, and looking back I don’t know why I did that. I should know by now that python and Ruby are much easier to work with than Java has proven to. Hell even the build environment is a pain: ant – write xml build file from scratch, maven – reminds me of make with lot’s of pom.xml files, or buildr – ruby based maven replacement, annoys all Java people. If I had a do over on this I’d choose Ruby as the implementation language.

Since we’re using Java and needed a database we went with Hibernate. If I had to redo this decision, I most certainly would’ve gone with a NoSQL datastore like MongoDB or CouchDB, this way I could avoid the annoying mapping of domain model to relational tables which is highly annoying.

So if you’re planning a new webapp avoid the boring, traditional webapp design of using a relational database with ORM and compiled languages :)

Nuggets

Here are some of the great nuggets from the link I posted tonight.

So GWT tries to hide Javascript from Java programmers, the same way Hibernate and other ORMs try to hide the database. How many of you use ORMs? How many of you have run into this problem? On Spacewalk we ran into this a lot, so much so we gave up on Hibernate for any other than loading an object for editing, in favor of straight SQL stored in an XML file.

“This is the same basic problem with ORMs like Hibernate: Object-relational impedance mismatch. Every now and again you end up spending half a day figuring the correct combination of properties, annotations, XML and VM parameters to have a query generate the right two lines of SQL that’ll actually be performant.”

Another thing I’ve always said to my management and team members was exactly this. That’s why I’m against open coding environments.

“We all know that knowledge workers work best by getting into “flow”, also known as being “in the zone”, where they are fully concentrated on their work and fully tuned out of their environment. They lose track of time and produce great stuff through absolute concentration. This is when they get all of their productive work done. Writers, programmers, scientists, and even basketball players will tell you about being in the zone.

The trouble is, getting into “the zone” is not easy. When you try to measure it, it looks like it takes an average of 15 minutes to start working at maximum productivity.

The other trouble is that it’s so easy to get knocked out of the zone. Noise, phone calls, going out for lunch, having to drive 5 minutes to Starbucks for coffee, and interruptions by coworkers — especially interruptions by coworkers — all knock you out of the zone.

And as I stated in my Overengineered Project post., Java devs like to over engineer solutions in favor of flexibility that may or may not happen.

“What’s more Java programmers have a predilection with concerning themselves about swapping out layers or putting in alternative implementations that never happen.

I am a firm believer that lines of code are the enemy. “

And we’re totally guilty of these layers as well, even on project Spacewalk we can see some of these things in practice. We
have a Manager layer, a UI layer, not to mention a database layer :)

“It’s not [sic] secret that Java programmers love their layers. No sooner do you have a Presentation Layer, a Controller Layer and a Repository Layer than someone suggest you also need a Database Abstraction Layer, a Service Layer, a Web Services Layer and a Messaging Layer.”

So what can you learn from all this? KISS!