Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing to console an output fails my creation script #54

Open
mattronix opened this issue Feb 14, 2024 · 6 comments
Open

Printing to console an output fails my creation script #54

mattronix opened this issue Feb 14, 2024 · 6 comments

Comments

@mattronix
Copy link

When creating, a new resource via market space script (python).

Error message [ErrorDetail(string='Unexpected structure of output', code=['mattronix,', 'has', 'been', 'deployed.'])] Error traceback Traceback (most recent call last): File "/usr/src/waldur/src/waldur_mastermind/marketplace/utils.py", line 104, in process_order processor(order).process_order(user) File "/usr/src/waldur/src/waldur_mastermind/marketplace/processors.py", line 70, in process_order scope = self.send_request(user) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/waldur/src/waldur_mastermind/marketplace_script/processors.py", line 73, in send_request raise serializers.ValidationError( rest_framework.exceptions.ValidationError: [ErrorDetail(string='Unexpected structure of output', code=['mattronix,', 'has', 'been', 'deployed.'])]

Here is the script for example: https://github.com/mattronix/waldur-custom-offerings/blob/main/create_user_over_ssh/storage-user-add-waldur.py

@livenson
Copy link
Contributor

yes, this is intended

this will be documented for #50 .

Meanwhile you can check the code -
https://github.com/waldur/waldur-mastermind/blob/develop/src/waldur_mastermind/marketplace_script/processors.py#L48

Basically, creation script expect either a single word in the last line of the output, or 2 words with second being base64 encoded metadata.

@mattronix
Copy link
Author

ah! i see thanks, hope you dont mind me reporting these things as i see them :)

I also noticed exit0 and exit1 dont trigger the deployment to fail, at this moment what would be the best way to do a check and say fail as you cant do that due to it already existing.

Also wanna cleanup the resource if it fails.

@mattronix
Copy link
Author

what is the backend_id and metadata used for?

@mattronix
Copy link
Author

Dont quite follow what the backend_id is for can you help me in the right direction?

Do you maybe have a slack or chat group for this kind of stuff

@livenson
Copy link
Contributor

Hi,

first of all, sorry for incorrect estimations as to when we can get to the issues you've raised. As they say, if you want to make God laugh, tell him your plans. Anyways, we don't have really chats/groups for non-paying customers, but send me some contact details to ilja@opennodecloud.com with messenger details of your choice (signal, slack or skype are ok) and I will add you.

On the topic - backend_id is used for referencing a unique 'isolation' in the backend system matching resource in waldur.
E.g. openstack tenant uuid for a resource matching tenant, or a slurm hpc allocation name for slurm.

@mattronix
Copy link
Author

No problem, dont want to be a bother or anything just checking in from time to time :)

Il send you my contacts since probably most of my questions are not really good for issues ahahahha.

Thanks anyway for all the help so far :)

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

No branches or pull requests

2 participants