Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Fix invalid parameter error when calling euca-import-volume command #162

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

phsmoura
Copy link

@phsmoura phsmoura commented Feb 17, 2022

Changes description

trigger_upload.py wasn't working because when it calls euca-import-volume, that command was throwing an error about an invalid format of the manifest url when concatenating it with the path of the file.
This PR works around that problem because euca-import-volume works just fine when executed directly from /tmp directory.

Here is last lines of the log with those changes:

[2022-02-17 01:11:40][fedimg.services.ec2.ec2imgpublisher    INFO] Publish image (ami-0499d828467cb4cf1) in eu-west-2 started
[2022-02-17 01:11:40][fedimg.services.ec2.ec2imgpublisher    INFO] Publish image (ami-0499d828467cb4cf1) in eu-west-2 completed
[2022-02-17 01:11:40][fedimg.services.ec2.ec2imgpublisher    INFO] Publish snaphsot for image (ami-0499d828467cb4cf1) in eu-west-2 started
[2022-02-17 01:11:41][fedimg.services.ec2.ec2imgpublisher    INFO] Fetched snapshot for image (ami-0499d828467cb4cf1): snap-0bfc5543eb0cd474e
[2022-02-17 01:11:41][fedimg.services.ec2.ec2imgpublisher    INFO] Publish snaphsot for image (ami-0499d828467cb4cf1) in eu-west-2 completed
[2022-02-17 01:11:41][fedimg.uploader    INFO] AWS EC2Service process is completed.

Related Issue

Signed-off-by: Pedro Moura [email protected]

@@ -166,7 +166,7 @@ def _create_volume(self, source):
if self.volume_via_s3:
output, err, retcode = external_run_command([
'euca-import-volume',
source,
source[5:],
Copy link

@markobrien1 markobrien1 Feb 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to strip /tmp/ from the source name due to the directory change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants