{"action":"created","issue":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/962","labels_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/962/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/962/comments","events_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/962/events","html_url":"https://github.com/bloomberg/chef-bcpc/pull/962","id":124278440,"number":962,"title":"Make swap size configurable for VMs","user":{"login":"kamidzi","id":8375625,"avatar_url":"https://avatars.githubusercontent.com/u/8375625?v=3","gravatar_id":"","url":"https://api.github.com/users/kamidzi","html_url":"https://github.com/kamidzi","followers_url":"https://api.github.com/users/kamidzi/followers","following_url":"https://api.github.com/users/kamidzi/following{/other_user}","gists_url":"https://api.github.com/users/kamidzi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamidzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamidzi/subscriptions","organizations_url":"https://api.github.com/users/kamidzi/orgs","repos_url":"https://api.github.com/users/kamidzi/repos","events_url":"https://api.github.com/users/kamidzi/events{/privacy}","received_events_url":"https://api.github.com/users/kamidzi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"erhudy","id":1065271,"avatar_url":"https://avatars.githubusercontent.com/u/1065271?v=3","gravatar_id":"","url":"https://api.github.com/users/erhudy","html_url":"https://github.com/erhudy","followers_url":"https://api.github.com/users/erhudy/followers","following_url":"https://api.github.com/users/erhudy/following{/other_user}","gists_url":"https://api.github.com/users/erhudy/gists{/gist_id}","starred_url":"https://api.github.com/users/erhudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erhudy/subscriptions","organizations_url":"https://api.github.com/users/erhudy/orgs","repos_url":"https://api.github.com/users/erhudy/repos","events_url":"https://api.github.com/users/erhudy/events{/privacy}","received_events_url":"https://api.github.com/users/erhudy/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-12-29T22:39:39Z","updated_at":"2016-01-26T14:20:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/pulls/962","html_url":"https://github.com/bloomberg/chef-bcpc/pull/962","diff_url":"https://github.com/bloomberg/chef-bcpc/pull/962.diff","patch_url":"https://github.com/bloomberg/chef-bcpc/pull/962.patch"},"body":" - Closes #851.\r\n - Also adds config dumping util.\r\n\r\nAlso fixes a subtle bug with re-provisions. If the swapfile size has been decreased, the configured swap would not shrink correspondingly as that larger quantity would have already been `fallocate`'d; hence the call to `truncate`. A good testing command (for re-provisions) is:\r\n\r\n```\r\n vagrant provision vm1 --provision-with add-swap-space && vagrant ssh vm1 -c 'ls -l --si /swap; cat /etc/fstab ; cat /proc/swaps'\r\n```\r\n\r\nIt can also be seen that if only `truncate` is used, then growing the swap file will also not work as the file will be sparse and the provisioner will complain:\r\n\r\n```\r\n==> vm1: Running provisioner: add-swap-space (shell)...\r\n    vm1: Running: inline script\r\n==> vm1: Setting up swapspace version 1, size = 450556 KiB\r\n==> vm1: no label, UUID=37d5b221-5486-40e1-a799-0a19468c9af3\r\n==> vm1: swapon:\r\n==> vm1: /swap: skipping - it appears to have holes.\r\n```"},"comment":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/comments/175038206","html_url":"https://github.com/bloomberg/chef-bcpc/pull/962#issuecomment-175038206","issue_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/962","id":175038206,"user":{"login":"kamidzi","id":8375625,"avatar_url":"https://avatars.githubusercontent.com/u/8375625?v=3","gravatar_id":"","url":"https://api.github.com/users/kamidzi","html_url":"https://github.com/kamidzi","followers_url":"https://api.github.com/users/kamidzi/followers","following_url":"https://api.github.com/users/kamidzi/following{/other_user}","gists_url":"https://api.github.com/users/kamidzi/gists{/gist_id}","starred_url":"https://api.github.com/users/kamidzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamidzi/subscriptions","organizations_url":"https://api.github.com/users/kamidzi/orgs","repos_url":"https://api.github.com/users/kamidzi/repos","events_url":"https://api.github.com/users/kamidzi/events{/privacy}","received_events_url":"https://api.github.com/users/kamidzi/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T14:20:51Z","updated_at":"2016-01-26T14:20:51Z","body":"I've added $HOME for now, but yes we should really namespace the envvars in a future effort"}}