【问题标题】:Unable to create action due to name clash but no existing action has this name?由于名称冲突而无法创建操作但没有现有操作具有此名称?
【发布时间】:2018-04-11 18:57:08
【问题描述】:

从命令行创建新的 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

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

【问题讨论】:

    标签: openwhisk


    【解决方案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
    

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-25
      • 2016-01-28
      • 2020-03-27
      • 1970-01-01
      相关资源
      最近更新 更多