Problems with Berkshelf 2.0.x lock mechanism

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”,
“git”: “git://github.com/comns/chef_users-and-groups.git”,
“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

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 haim.ashkenazi@gmail.comwrote:

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",
"git": "git://github.com/comns/chef_users-and-groups.git",
"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

I've had many problems with berkshelf's locking, but most of them have been fixed in recent months.

Have you checked the open tickets at Issues · berkshelf/berkshelf · GitHub ?

If it's not in there, please post a ticket. The maintainers are extremely responsive.

~j

On 2013-06-19, at 10:57, Haim Ashkenazi haim.ashkenazi@gmail.com wrote:

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 haim.ashkenazi@gmail.com 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",
"git": "git://github.com/comns/chef_users-and-groups.git",
"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

Hi

There's already a ticket and a maintainer submitted a PR:

Thanks

On Thu, Jun 20, 2013 at 8:56 PM, Joseph Holsten joseph@josephholsten.comwrote:

I've had many problems with berkshelf's locking, but most of them have
been fixed in recent months.

Have you checked the open tickets at
Issues · berkshelf/berkshelf · GitHub ?

If it's not in there, please post a ticket. The maintainers are extremely
responsive.

~j

On 2013-06-19, at 10:57, Haim Ashkenazi haim.ashkenazi@gmail.com wrote:

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 <
haim.ashkenazi@gmail.com> 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",
"git": "git://github.com/comns/chef_users-and-groups.git",
"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

--
Haim