<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Hervé<br>
</p>
<p><br>
</p>
<p>I tried again, this time defining explictitly all parameters,
including action_region and snapshot_id.</p>
<p>The results were same as previously: it works when executing the
workflow directly but fails with a cron trigger.</p>
<p>Or to be more precise, the cron trigger execution "succeeds" but
the resulting volume backup fails :</p>
<p>(.venv) ewfsc@ewos1-kolla1-stage:~$ openstack volume backup show
-f json abe96cb1-a5e1-4035-87dd-b4292101a921<br>
{<br>
"status": "error", <br>
"object_count": 0, <br>
"fail_reason": "Container PUT failed:
<a class="moz-txt-link-freetext" href="http://rgw.service.stage.i.ewcs.ch/swift/v1/AUTH_aeac4b07d8b144178c43c65f29fa9dac/volumebackups">http://rgw.service.stage.i.ewcs.ch/swift/v1/AUTH_aeac4b07d8b144178c43c65f29fa9dac/volumebackups</a>
401 Unauthorized AccessDenied", <br>
"description": null, <br>
"name": "fsc-vol-1-img-vol-bak", <br>
"availability_zone": "ch-zh1-az1", <br>
"created_at": "2019-09-19T13:15:02.000000", <br>
"volume_id": "c0022411-59a4-4c7c-9474-c7ea8ccc7691", <br>
"updated_at": "2019-09-19T13:15:04.000000", <br>
"data_timestamp": "2019-09-19T12:38:02.000000", <br>
"has_dependent_backups": false, <br>
"snapshot_id": "b4b174eb-e6d2-4f66-8070-212e3e7e6114", <br>
"container": "volumebackups", <br>
"size": 1, <br>
"id": "abe96cb1-a5e1-4035-87dd-b4292101a921", <br>
"is_incremental": false<br>
}<br>
<br>
</p>
<p>Best Regards</p>
<p>Francois<br>
</p>
<p><br>
</p>
<p>Details:<br>
</p>
<p>Workflow<br>
---<br>
version: "2.0"<br>
create_vol_backup:<br>
type: direct<br>
input:<br>
- volume_id <br>
- container<br>
- name <br>
- incremental <br>
- force<br>
- action_region<br>
- snapshot_id <br>
<br>
tasks:<br>
create_vol_backup:<br>
action: cinder.backups_create volume_id=<%
$.volume_id %> name=<% $.name %> container=<%
$.container %> incremental=<% $.incremental %>
force=<% $.force %> action_region=<% $.action_region%>
snapshot_id=<% $.snapshot_id %><br>
publish:<br>
backup_id: <% task(create_vol_backup).result %><br>
create_state: SUCCESS<br>
publish-on-error:<br>
create_state: ERROR<br>
<br>
Input<br>
{<br>
"volume_id": "c0022411-59a4-4c7c-9474-c7ea8ccc7691",<br>
"container": "volumebackups",<br>
"name": "fsc-vol-1-img-vol-bak", <br>
"incremental": "false", <br>
"force": "true", <br>
"action_region": "ch-zh1", <br>
"snapshot_id": "b4b174eb-e6d2-4f66-8070-212e3e7e6114"<br>
}</p>
<p>Params<br>
{<br>
"namespace": "", <br>
"env": {}, <br>
"task_name": "create_vol_backup_task"<br>
}<br>
<br>
<br>
</p>
<div class="moz-cite-prefix">On 9/19/19 2:28 PM, Francois Scheurer
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:bfcae802-36f7-85ba-a8ac-d6137e137737@everyware.ch">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi Herve</p>
<p><br>
</p>
<p>Thank you for your reply.<br>
</p>
<p>I am using the same input & params as when executing the
workflow directly from horizon (successfully):<br>
</p>
<p> {<br>
"incremental": "false", <br>
"force": "true", <br>
"name": "fsc-create-vol-backup", <br>
"volume_id": "c0022411-59a4-4c7c-9474-c7ea8ccc7691"<br>
}<br>
<br>
{<br>
"namespace": "", <br>
"env": {}, <br>
"task_name": "create_vol_backup_task"<br>
}<br>
</p>
<p>Maybe I need some additional params when executing via cron?</p>
<p>I will try specfying the objectstore container explicitly.</p>
<p><br>
</p>
<p>Best Regards</p>
<p>Francois<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 9/19/19 1:18 PM, Herve Beraud
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFDq9gV5770HTwaEv-wFeCxwiuzy=C1eQpkpZHG8Co-gc73yag@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div>Hello François,</div>
<div><br>
</div>
<div>Given your error, are you sure your cron task load the
right config with the right authorized user or something
related?<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le jeu. 19 sept. 2019
à 11:51, Francois Scheurer <<a
href="mailto:francois.scheurer@everyware.ch"
moz-do-not-send="true">francois.scheurer@everyware.ch</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Dear All<br>
<br>
<br>
We are using Mistral with Openstack Rocky. (with federated
users)<br>
We could then use cron triggers for instance with <br>
nova.servers_create_image or cinder.volume_snapshots_create
with success.<br>
<br>
<br>
But we hit an issue with cinder.backups_create .<br>
<br>
This call will stores the backup on our swift backend (ceph
rgw).<br>
The workflow works when executed directly but it fails when
executed via <br>
cron trigger:<br>
<br>
2019-09-17 10:46:04.525 8 ERROR oslo_messaging.rpc.server <br>
ClientException: Container PUT failed: <br>
<a
href="http://rgw.service.stage.i.ewcs.ch/swift/v1/AUTH_aeac4b07d8b144178c43c65f29fa9dac/volumebackups"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://rgw.service.stage.i.ewcs.ch/swift/v1/AUTH_aeac4b07d8b144178c43c65f29fa9dac/volumebackups</a>
<br>
401 Unauthorized AccessDenied<br>
<br>
See details below.<br>
<br>
<br>
<br>
<br>
<br>
Cheers<br>
<br>
Francois<br>
</blockquote>
</div>
</blockquote>
</blockquote>
<pre class="moz-signature" cols="72">--
EveryWare AG
François Scheurer
Senior Systems Engineer
Zurlindenstrasse 52a
CH-8003 Zürich
tel: +41 44 466 60 00
fax: +41 44 466 60 10
mail: <a class="moz-txt-link-abbreviated" href="mailto:francois.scheurer@everyware.ch">francois.scheurer@everyware.ch</a>
web: <a class="moz-txt-link-freetext" href="http://www.everyware.ch">http://www.everyware.ch</a> </pre>
</body>
</html>