Tooky
June 26, 2018, 1:05pm
1
We are just starting to experiment with adding an admin command. We’ve added something very simple:
properties:
shell_alias: cpro
admin_commands:
- alias: reindex-search
command: ["sh", "-c", "echo", "hello world"]
run_type: exec
component: WebApp
container: cucumber-pro
but we see this error:
root@xxxx:~# cpro reindex-search
Error: Connection could not be upgraded
1 Like
There should be an error in replicated container log. But I think this command is wrong:
command: ["sh", "-c", "echo", "hello world"]
Try
command: ["sh", "-c", 'echo "hello world"']
The the second argument to sh
is the script you want to run. There should be no third argument.
OK, we changed the command as above but now get this in the replicated container log :
ERRO 2018-06-26T19:39:45+00:00 [replicated-native] scheduler.go:298 Native scheduler failed to build admin command: admin command reindex-search not supported for native
ERRO 2018-06-26T19:39:45+00:00 premkit/log/gin.go:52 [GIN] 500 | 949.041µs | | POST /v0.1/admin/command/start
@Sallyann_Freudenberg , can yo include relevant yaml? reindex-search
is something that you defined.
properties:
shell_alias: cpro
admin_commands:
- alias: reindex-search
command: ["sh", "-c", 'echo "hello world"']
run_type: exec
component: WebApp
container: cucumber-pro
Just to make sure, there is a container cucumber-pro
within the component WebApp
elsewhere in that yaml, correct?
I believe so. It’s expressed like this:
components:
name: WebApp
.
.
.
subscriptions:
- component: WebApp
container: cucumber-pro
action: start
Components aren’t allowed to subscribe to themselves. Is that the only place cucumber-pro
shows up in the WebApp component yaml?
No there is this container:
- source: replicated
image_name: cucumber-pro
name: cucumber-pro
version: "GIT_SHA"
(And yes you are of course right about the subscription, that’s in the postgres container, so it’s not subscribing to itself)
1 Like
Do you have any ideas why we might be getting the initial admin command reindex-search not supported for native
?
I’m not sure - that error should only show up for either component or container not being populated, but that does not seem to be the case here. Would you mind sending the whole yaml out-of-band to test with?
Tooky
June 27, 2018, 4:23pm
13
@laverya I’ve sent this yaml in Slack
1 Like