From 9cd8fb64dada991816c8ed27c0616a808cfe2483 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Fri, 13 Feb 2015 14:50:20 +0530 Subject: [PATCH] keyserver issue fix --- ee/cli/plugins/stack.py | 2 +- ee/core/apt_repo.py | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ee/cli/plugins/stack.py b/ee/cli/plugins/stack.py index 1d3fff20..dd79b781 100644 --- a/ee/cli/plugins/stack.py +++ b/ee/cli/plugins/stack.py @@ -90,7 +90,7 @@ class EEStackController(CementBaseController): Log.debug(self, 'Adding key for {0}' .format(EEVariables.ee_mysql_repo)) EERepo.add_key(self, '1C4CBDCDCD2EFD2A', - keyserver="subkeys.pgp.net") + keyserver="http://keyserver.ubuntu.com:80") chars = ''.join(random.sample(string.ascii_letters, 8)) Log.debug(self, "Pre-seeding MySQL") EEShellExec.cmd_exec(self, "echo \"percona-server-server-5.6 " diff --git a/ee/core/apt_repo.py b/ee/core/apt_repo.py index aea5b2a7..a32794b5 100644 --- a/ee/core/apt_repo.py +++ b/ee/core/apt_repo.py @@ -71,11 +71,10 @@ class EERepo(): default keyserver is hkp://keys.gnupg.net user can provide other keyserver with keyserver="hkp://xyz" """ - if keyserver is None: - EEShellExec.cmd_exec(self, "gpg --keyserver {serv}" - .format(serv=(keyserver or - "hkp://keys.gnupg.net")) - + " --recv-keys {key}".format(key=keyids)) - EEShellExec.cmd_exec(self, "gpg -a --export --armor {0}" - .format(keyids) - + " | apt-key add - ") + EEShellExec.cmd_exec(self, "gpg --keyserver {serv}" + .format(serv=(keyserver or + "hkp://keys.gnupg.net")) + + " --recv-keys {key}".format(key=keyids)) + EEShellExec.cmd_exec(self, "gpg -a --export --armor {0}" + .format(keyids) + + " | apt-key add - ")