{"action":"closed","issue":{"url":"https://api.github.com/repos/varnishcache/pkg-varnish-cache/issues/27","repository_url":"https://api.github.com/repos/varnishcache/pkg-varnish-cache","labels_url":"https://api.github.com/repos/varnishcache/pkg-varnish-cache/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/varnishcache/pkg-varnish-cache/issues/27/comments","events_url":"https://api.github.com/repos/varnishcache/pkg-varnish-cache/issues/27/events","html_url":"https://github.com/varnishcache/pkg-varnish-cache/issues/27","id":154290815,"number":27,"title":"Varnish 4.1 Ubuntu package breaks varnishncsa and varnishlog due to missing permissions","user":{"login":"gquintard","id":3776553,"avatar_url":"https://avatars.githubusercontent.com/u/3776553?v=3","gravatar_id":"","url":"https://api.github.com/users/gquintard","html_url":"https://github.com/gquintard","followers_url":"https://api.github.com/users/gquintard/followers","following_url":"https://api.github.com/users/gquintard/following{/other_user}","gists_url":"https://api.github.com/users/gquintard/gists{/gist_id}","starred_url":"https://api.github.com/users/gquintard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gquintard/subscriptions","organizations_url":"https://api.github.com/users/gquintard/orgs","repos_url":"https://api.github.com/users/gquintard/repos","events_url":"https://api.github.com/users/gquintard/events{/privacy}","received_events_url":"https://api.github.com/users/gquintard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-11T16:49:40Z","updated_at":"2016-05-23T11:19:05Z","closed_at":"2016-05-23T11:19:05Z","body":"replicating https://github.com/varnishcache/varnish-cache/issues/1947\r\n\r\nI´m having trouble upgrading Varnish 4.0 to 4.1 on Ubuntu 12.04 and 14.04. So, I tried a clean install of 4.1 on a new VM and it fails too.\r\n\r\n## Expected Behavior\r\nThe `varnish` daemon correctly starts out-of-the-box. Then the optional `varnishncsa` service is enabled (was already enabled when upgrading or is enabled on a clean install) via the variable `VARNISHNCSA_ENABLED=1` in file `/etc/default/varnishncsa`.\r\n\r\nWhen I try to start the service via `service varnishncsa start` the `varnishncsa` daemon should start running in the background.\r\n\r\n## Current Behavior\r\n\r\nWhen I try to start the service via `service varnishncsa start` it fails to start.\r\n```\r\nroot@test01:~# service varnishncsa start\r\n * Starting HTTP accelerator log deamon                                [fail]\r\nCan't open log - retrying for 5 seconds\r\nCan't open VSM file (Cannot open /var/lib/varnish/test01/_.vsm: Permission denied\r\n)\r\n```\r\n\r\n## Possible Solution\r\n\r\nThe VSM-file´s permissions are:\r\n`-rw-r----- 1 root varnish 84934656 May 11 14:58 /var/lib/varnish/test01/_.vsm`\r\nwhen they used to be `root:root` in Varnish 4.0.\r\n\r\nAccording to https://www.varnish-cache.org/docs/trunk/whats-new/changes.html:\r\n> varnishlog, varnishncsa and other Varnish shared log utilities now must be run in a context with varnish group membership.\r\n\r\nSo, the package should fix group membership on upgrade and installation by adding the user `varnishlog` to the group `varnish`, before attempting to start the varnishlog and varnishncsa daemons.\r\n\r\n## Steps to Reproduce (for bugs)\r\n1. Start an Ubuntu 14.04 VM\r\n2. `apt-get install apt-transport-https`\r\n3. `curl https://repo.varnish-cache.org/GPG-key.txt | apt-key add -`\r\n4. `echo \"deb https://repo.varnish-cache.org/ubuntu/ trusty varnish-4.1\" >> /etc/apt/sources.list.d/varnish-cache.list`\r\n5. `apt-get update && apt-get install varnish`\r\n6. `echo \"VARNISHNCSA_ENABLED=1\" > /etc/default/varnishncsa`\r\n7. `service varnishncsa start`\r\n\r\n## Context\r\nUpgrading from Varnish 4.0 to 4.1 failed because we had enabled the varnishncsa service.\r\n\r\n```\r\nroot@test01:/var/lib/varnish/test01# apt full-upgrade\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nCalculating upgrade... Done\r\nThe following packages will be upgraded:\r\n  libvarnishapi1 varnish\r\n2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 0 B/588 kB of archives.\r\nAfter this operation, 113 kB of additional disk space will be used.\r\nDo you want to continue? [Y/n]\r\n(Reading database ... 95839 files and directories currently installed.)\r\nPreparing to unpack .../libvarnishapi1_4.1.2-2~trusty_amd64.deb ...\r\nUnpacking libvarnishapi1 (4.1.2-2~trusty) over (4.0.3-5~trusty) ...\r\nPreparing to unpack .../varnish_4.1.2-2~trusty_amd64.deb ...\r\n * Stopping HTTP accelerator log deamon varnishncsa                                                                                         [ OK ]\r\n * Stopping HTTP accelerator\r\nvarnishd                                                                                               [ OK ]\r\nUnpacking varnish (4.1.2-2~trusty) over (4.0.3-5~trusty) ...\r\nProcessing triggers for ureadahead (0.100.0-16) ...\r\nProcessing triggers for man-db (2.6.7.1-1ubuntu1) ...\r\nSetting up libvarnishapi1 (4.1.2-2~trusty) ...\r\nSetting up varnish (4.1.2-2~trusty) ...\r\nInstalling new version of config file /etc/init.d/varnish ...\r\n\r\nConfiguration file '/etc/varnish/default.vcl'\r\n ==> Modified (by you or by a script) since installation.\r\n ==> Package distributor has shipped an updated version.\r\n ==> Keeping old config file as default.\r\n * Starting HTTP accelerator\r\nvarnish                                                                                               [ OK ]\r\n * Starting HTTP accelerator log deamon\r\nvarnishncsa                                                                                        [fail]\r\nCan't open log - retrying for 5 seconds\r\nCan't open VSM file (Cannot open /var/lib/varnish/test01/_.vsm: Permission denied\r\n)\r\ninvoke-rc.d: initscript varnishncsa, action \"start\" failed.\r\ndpkg: error processing package varnish (--configure):\r\n subprocess installed post-installation script returned error exit status 1\r\nProcessing triggers for libc-bin (2.19-0ubuntu6.7) ...\r\nProcessing triggers for ureadahead (0.100.0-16) ...\r\nErrors were encountered while processing:\r\n varnish\r\nE: Sub-process /usr/bin/dpkg returned an error code (1)\r\n\r\n```\r\n\r\n## Your Environment\r\n* Amazon VPC, t2.small instance\r\n* Official Ubuntu 14.04.4 image\r\n* Varnish package 4.1.2-2~trusty from http://repo.varnish-cache.org/ubuntu/dists/trusty/"}}
{"actor":{"display_login":"gquintard"}}