[chef] Re: Problems with Berkshelf 2.0.x lock mechanism


Chronological Thread 
  • From: Haim Ashkenazi < >
  • To:
  • Subject: [chef] Re: Problems with Berkshelf 2.0.x lock mechanism
  • Date: Wed, 19 Jun 2013 20:57:54 +0300

I forgot to mention that this happens when I clean the $HOME/.berkshelf directory (to emulate new developer).

Thanks



On Wed, Jun 19, 2013 at 7:18 PM, Haim Ashkenazi < " target="_blank"> > wrote:
Hi

I was happy to see that berkshelf 2.0.x was released as I thought it solved the locking mechanism but it seems that something is wrong. I have a "backwards" setup in the sense that I define my dependencies directly in the berksfile and use a rake task to write all the exact versions to the metadata file.

My Berksfile is:

site :opscode

# Please see the README for dependency management.
cookbook "realiteq", path: "." # don't remove this or vagrant will fail!
cookbook "users-and-groups", github: "comns/chef_users-and-groups", ref: "v0.1.2"
cookbook "sudo", "~> 2.1.2"
cookbook "nginx", "~> 1.6.0"
cookbook "postfix", "~> 2.1.4"
cookbook "ntp", "~> 1.3.2"
cookbook "apt", "~> 1.10.0"
cookbook "chef-client", "~> 2.2.4"

And my lock file (converted from 1.x) is:

realiteq ➤ cat Berksfile.lock                                                                               git:master*
{
  "sha": "60079019c90586f0481bf0d711923b67c45d23a0",
  "sources": {
    "realiteq": {
      "path": "."
    },
    "users-and-groups": {
      "locked_version": "0.1.1",
      "ref": "ea771662e574fe502fc8418ff61c397957b4a0c0"
    },
    "sudo": {
      "locked_version": "2.1.2",
      "constraint": "~> 2.1.2"
    },
    "nginx": {
      "locked_version": "1.6.0",
      "constraint": "~> 1.6.0"
    },
    "postfix": {
      "locked_version": "2.1.4",
      "constraint": "~> 2.1.4"
    },
    "ntp": {
      "locked_version": "1.3.2",
      "constraint": "~> 1.3.2"
    },
    "apt": {
      "locked_version": "1.10.0",
      "constraint": "~> 1.10.0"
    },
    "chef-client": {
      "locked_version": "2.2.4",
      "constraint": "~> 2.2.4"
    },
    "build-essential": {
      "locked_version": "1.4.0",
      "constraint": "= 1.4.0"
    },
    "cron": {
      "locked_version": "1.2.2",
      "constraint": "= 1.2.2"
    },
    "ohai": {
      "locked_version": "1.1.8",
      "constraint": "= 1.1.8"
    },
    "runit": {
      "locked_version": "1.1.4",
      "constraint": "= 1.1.4"
    },
    "yum": {
      "locked_version": "2.2.2"
    }
  }
}

See versions for postfix (2.1.4) and yum (2.2.2).

However when I install or list dependencies I get:

realiteq ➤ be berks list                                                                                    git:master*
Cookbooks installed by your Berksfile:
  * apt (1.10.0)
  * build-essential (1.4.0)
  * chef-client (2.2.4)
  * cron (1.2.2)
  * nginx (1.6.0)
  * ntp (1.3.2)
  * ohai (1.1.8)
  * postfix (2.1.6)
  * realiteq (0.1.7)
  * runit (1.1.4)
  * sudo (2.1.2)
  * users-and-groups (0.1.1)
  * yum (2.3.0)

The Berkshelf version is:

realiteq ➤ be berks -v                                                                                      git:master*
Berkshelf (2.0.4)


It seems to completely ignore the locked version of both postfix and yum. Am I doing something wrong?

Thanks in advance

--
Haim



--
Haim



Archive powered by MHonArc 2.6.16.

§