Hi,
fedimg contains a trigger upload script that helps in uploading the raw images in case the upload fails. This patch fixes the script to use the third parameter in the function that would push the compose metadata.
+1s?
From: Sayan Chowdhury sayan.chowdhury2012@gmail.com Date: Tue, 13 Mar 2018 17:07:53 +0530 Subject: [PATCH 1/1] fedimg: Fix the trigger_upload script to create AMIs manually
--- roles/fedimg/files/trigger_upload.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/roles/fedimg/files/trigger_upload.py b/roles/fedimg/files/trigger_upload.py index 5a5208d..29907f1 100644 --- a/roles/fedimg/files/trigger_upload.py +++ b/roles/fedimg/files/trigger_upload.py @@ -16,7 +16,7 @@ from fedimg.services.ec2 import EC2Service, EC2ServiceException import fedimg.uploader from fedimg.util import virt_types_from_url
-if len(sys.argv) != 2: +if len(sys.argv) != 3: print 'Usage: trigger_upload.py <rawxz_image_url>' sys.exit(1)
@@ -26,5 +26,10 @@ log = logging.getLogger('fedmsg') upload_pool = multiprocessing.pool.ThreadPool(processes=4)
url = sys.argv[1] +compose_id = sys.argv[2]
-fedimg.uploader.upload(upload_pool, [url]) +compose_meta = { + 'compose_id': compose_id +} + +fedimg.uploader.upload(upload_pool, [url], compose_meta=compose_meta)
Can you update the usage text to include the new parameter?
-re
On Tue, Mar 13, 2018 at 7:54 AM, Sayan Chowdhury sayan.chowdhury2012@gmail.com wrote:
Hi,
fedimg contains a trigger upload script that helps in uploading the raw images in case the upload fails. This patch fixes the script to use the third parameter in the function that would push the compose metadata.
+1s?
From: Sayan Chowdhury sayan.chowdhury2012@gmail.com Date: Tue, 13 Mar 2018 17:07:53 +0530 Subject: [PATCH 1/1] fedimg: Fix the trigger_upload script to create AMIs manually
roles/fedimg/files/trigger_upload.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/roles/fedimg/files/trigger_upload.py b/roles/fedimg/files/trigger_upload.py index 5a5208d..29907f1 100644 --- a/roles/fedimg/files/trigger_upload.py +++ b/roles/fedimg/files/trigger_upload.py @@ -16,7 +16,7 @@ from fedimg.services.ec2 import EC2Service, EC2ServiceException import fedimg.uploader from fedimg.util import virt_types_from_url
-if len(sys.argv) != 2: +if len(sys.argv) != 3: print 'Usage: trigger_upload.py <rawxz_image_url>' sys.exit(1)
@@ -26,5 +26,10 @@ log = logging.getLogger('fedmsg') upload_pool = multiprocessing.pool.ThreadPool(processes=4)
url = sys.argv[1] +compose_id = sys.argv[2]
-fedimg.uploader.upload(upload_pool, [url]) +compose_meta = {
- 'compose_id': compose_id
+}
+fedimg.uploader.upload(upload_pool, [url], compose_meta=compose_meta)
2.9.4
-- Sayan Chowdhury https://sayanchowdhury.dgplug.org/ Senior Software Engineer, Fedora Engineering - Emerging Platform GPG Fingerprint : 0F16 E841 E517 225C 7D13 AB3C B023 9931 9CD0 5C8B _______________________________________________ infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-leave@lists.fedoraproject.org
On Tue, Mar 13, 2018 at 5:28 PM, Ricky Elrod codeblock@fedoraproject.org wrote:
Can you update the usage text to include the new parameter?
-re
Ricky, I have updated the params
From: Sayan Chowdhury sayan.chowdhury2012@gmail.com Date: Tue, 13 Mar 2018 17:07:53 +0530 Subject: [PATCH 1/1] fedimg: Fix the trigger_upload script to create AMIs manually
Signed-off-by: Sayan Chowdhury sayan.chowdhury2012@gmail.com --- roles/fedimg/files/trigger_upload.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/roles/fedimg/files/trigger_upload.py b/roles/fedimg/files/trigger_upload.py index 5a5208d..7f5d0ba 100644 --- a/roles/fedimg/files/trigger_upload.py +++ b/roles/fedimg/files/trigger_upload.py @@ -16,8 +16,8 @@ from fedimg.services.ec2 import EC2Service, EC2ServiceException import fedimg.uploader from fedimg.util import virt_types_from_url
-if len(sys.argv) != 2: - print 'Usage: trigger_upload.py <rawxz_image_url>' +if len(sys.argv) != 3: + print 'Usage: trigger_upload.py <rawxz_image_url> <compose_id>' sys.exit(1)
logging.config.dictConfig(fedmsg.config.load_config()['logging']) @@ -26,5 +26,10 @@ log = logging.getLogger('fedmsg') upload_pool = multiprocessing.pool.ThreadPool(processes=4)
url = sys.argv[1] +compose_id = sys.argv[2]
-fedimg.uploader.upload(upload_pool, [url]) +compose_meta = { + 'compose_id': compose_id +} + +fedimg.uploader.upload(upload_pool, [url], compose_meta=compose_meta)
On 03/13/2018 04:54 AM, Sayan Chowdhury wrote:
Hi,
fedimg contains a trigger upload script that helps in uploading the raw images in case the upload fails. This patch fixes the script to use the third parameter in the function that would push the compose metadata.
+1s?
+1 here (with the usage update change from downthread)
kevin
+1 with the change. Thanks.
-re
On Tue, Mar 13, 2018 at 2:07 PM, Kevin Fenzi kevin@scrye.com wrote:
On 03/13/2018 04:54 AM, Sayan Chowdhury wrote:
Hi,
fedimg contains a trigger upload script that helps in uploading the raw images in case the upload fails. This patch fixes the script to use the third parameter in the function that would push the compose metadata.
+1s?
+1 here (with the usage update change from downthread)
kevin
infrastructure mailing list -- infrastructure@lists.fedoraproject.org To unsubscribe send an email to infrastructure-leave@lists.fedoraproject.org
infrastructure@lists.fedoraproject.org