{"action":"closed","issue":{"url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1804","repository_url":"https://api.github.com/repos/inverse-inc/packetfence","labels_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1804/labels{/name}","comments_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1804/comments","events_url":"https://api.github.com/repos/inverse-inc/packetfence/issues/1804/events","html_url":"https://github.com/inverse-inc/packetfence/issues/1804","id":187247236,"number":1804,"title":"Install on Scientific Linux 6.x can't start","user":{"login":"willhertz","id":16229776,"avatar_url":"https://avatars.githubusercontent.com/u/16229776?v=3","gravatar_id":"","url":"https://api.github.com/users/willhertz","html_url":"https://github.com/willhertz","followers_url":"https://api.github.com/users/willhertz/followers","following_url":"https://api.github.com/users/willhertz/following{/other_user}","gists_url":"https://api.github.com/users/willhertz/gists{/gist_id}","starred_url":"https://api.github.com/users/willhertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willhertz/subscriptions","organizations_url":"https://api.github.com/users/willhertz/orgs","repos_url":"https://api.github.com/users/willhertz/repos","events_url":"https://api.github.com/users/willhertz/events{/privacy}","received_events_url":"https://api.github.com/users/willhertz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-04T03:41:09Z","updated_at":"2016-11-04T13:25:25Z","closed_at":"2016-11-04T13:25:25Z","body":"## Scenario\r\nUsing RHEL derivative Scientific linux 6.x (tested with 6.7 and 6.8)\r\nand following the instructons on download page and on documentation\r\nI get the following \r\n\r\n```**# yum install --enablerepo=packetfence packetfence**\r\nLoaded plugins: fastestmirror, security\r\nSetting up Install Process\r\nLoading mirror speeds from cached hostfile\r\n * sl: ftp.scientificlinux.org\r\n * sl-security: ftp.scientificlinux.org\r\n * sl6x: ftp.scientificlinux.org\r\n * sl6x-security: ftp.scientificlinux.org\r\nhttp://inverse.ca/downloads/PacketFence/RHEL6.8/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - \"The requested URL returned error: 404 Not Found\"\r\nTrying other mirror.\r\nTo address this issue please refer to the below knowledge base article\r\n\r\nhttps://access.redhat.com/articles/1320623\r\n\r\nIf above article doesn't help to resolve this issue please open a ticket with Red Hat Support.\r\n\r\nError: Cannot retrieve repository metadata (repomd.xml) for repository: packetfence. Please verify its path and try again\r\n```\r\nIt was working in the morning with a test install over Centos7 but not with Scientific linux 6.x\r\n\r\n## What can be wrong?\r\nSeems like the mirror can't resolve some sort of address.\r\nThe `etc/yum.repos.d/packectfence` \r\nreferences download path \"automagically\" making use of yum variable `$releasever`\r\nlike this\r\n```\r\n[packetfence]\r\nname=PacketFence Repository\r\nbaseurl=http://inverse.ca/downloads/PacketFence/RHEL$releasever/$basearch\r\ngpgcheck=0\r\nenabled=0\r\n```\r\nThe directories on mirror server are named only after Major release i.e. RHEL7 RHEL6, \r\n**Using the following in Centos7** (the python one-liner reads the yum variables and shows them on stdout)\r\n>`# python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'`\r\n\r\nshows\r\n```\r\nLoaded plugins: fastestmirror\r\n{'arch': 'ia32e',\r\n 'basearch': 'x86_64',\r\n 'infra': 'stock',\r\n 'releasever': '7',\r\n 'uuid': 'some-mumbo-jumbo'}\r\n```\r\nRepeating same procedure in Scientific Linux 6.8\r\n\r\n>`# python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'`\r\nshows\r\n``` \r\nLoaded plugins: fastestmirror\r\n{'arch': 'ia32e',\r\n 'basearch': 'x86_64',\r\n 'releasever': '6.8',\r\n 'uuid': 'more-mumbo-jumbo'}\r\n```\r\n**BINGO!!!**\r\nreleasever expands to 6.8 so it resolves to a non-existent directory\r\n`http://inverse.ca/downloads/PacketFence/RHEL6.8/x86_64/`\r\ninstead  of\r\n`http://inverse.ca/downloads/PacketFence/RHEL6/x86_64/`\r\nthat does exist.\r\n\r\n## Possible Solutions (on developers side):\r\n\r\n- Do some regexp in packetfence.repo to extract only the major-release portion from $releasever variable (seems risky, prone to failure, boring and I don't even know if possible)\r\n- Make symlink or http redirect in mirror server that intercepts the dot and the minor-release from $releasever variable and redirects to the right path (Seems feasible)\r\n## Inmediate solution on users side.\r\n- Create the file /etc/yum/vars/releasever and put number `6` as only content on the first line. (Works ASAP, but not sure if it may interfere with yum and other repositores that expect newer systems than 6 flat. And if the file is removed if it may interfere with packetfence updating)\r\n\r\nIf someone thinks on a better solution please let know and update the docs accordingly.\r\nBest Regards"}}
{"actor":{"display_login":"louismunro"}}