由于名称冲突而无法创建操作,但现有的操作没有此名称?

时间:2017-10-30 17:45:30

标签: openwhisk

从命令行创建新的OpenWhisk操作,返回以下错误。

$ wsk action create hello index.js
error: Unable to create action 'hello': Resource by this name exists but is not in this collection. (code 4923976)
Run 'wsk --help' for usage.

查看已部署的操作,我看不到具有相同名称的其他操作。

$ wsk action list
actions
/user@email.com_dev/example                                   private nodejs:6
/user@email.com_dev/hello_world                               private nodejs:6
/user@email.com_dev/testing                                   private nodejs:6

该错误消息的原因是什么?

1 个答案:

答案 0 :(得分:1)

动作,触发器和规则名称在名称空间和包中必须是唯一的。

如果此标识符没有操作,请检查具有hello名称的触发器和规则。

这是一个示例,显示使用相同名称时操作,触发器和规则将发生冲突。

$ wsk trigger create clash
ok: created trigger clash
[17:41:41 /private/tmp]$ wsk action create clash index.js
error: Unable to create action 'clash': Resource by this name exists but is not in this collection. (code 5000008)
Run 'wsk --help' for usage.
[17:41:54 /private/tmp]$ wsk trigger delete clash
ok: deleted trigger clash
[17:42:06 /private/tmp]$ wsk action create clash index.js
ok: created action clash

可以通过为操作名称使用不同的标识符或重命名冲突资源来解决此错误。还可以在包内移动操作以停止与全局工作空间中的资源冲突。