Prisma1: graphcool delete fails locally

Created on 23 Oct 2017  路  9Comments  路  Source: prisma/prisma1

I hope this is helpful but I apologise if it lacks details or is difficult to reproduce. I ran into this while troubleshooting and wanting to start over without leaving 4 docker machines running in the background.

Current behavior

graphcool delete
? Are you sure that you want to delete cj943qp0l000601098v37d5do? y/N y
Deleting project cj943qp0l000601098v37d5do... !

ERROR: Cannot query field 'deleteProject' on type 'Mutation'. Did you mean 'addProject'? (line 3, column 7):
      cj943qp0l000601098v37d5do: deleteProject(input:{
      ^

{
  "data": null,
  "errors": [
    {
      "message": "Cannot query field 'deleteProject' on type 'Mutation'. Did you mean 'addProject'? (line 3, column 7):\n      cj943qp0l000601098v37d5do: deleteProject(input:{\n      ^",
      "locations": [
        {
          "line": 3,
          "column": 7
        }
      ]
    }
  ],
  "status": 400
}
bu2-confirmed arecli

Most helpful comment

That didn't quite reveal the persisted volume location. Here's how I nuked it. Note that it will nuke any other docker containers.

# stop all running containers
docker stop $(docker ps -a -q)

# remove all running containers
docker rm $(docker ps -a -q)

# remove all dangling volumes
docker volume rm `docker volume ls -q -f dangling=true`

All 9 comments

Same as #964

For now, you can remove the docker containers, which will delete all local Graphcool services irreversibly.

With docker ps you get the ids of the following containers:

  • graphcool/graphcool-dev
  • mysql
  • graphcool/localfaas
  • rabbitmq

Then kill & delete them:

docker kill <container id>
docker rm <container id>

Thanks -- is there, by any chance, a mounted volume that's persisting the data/configuration of those images? Because I did that, but when I try to reinitialise, I'm told that a project with that name already exists in my account (on my local cluster).

? Please choose the cluster you want to deploy to

local

? Please choose the target name dev
Creating service textblast locally in cluster local... !

ERROR: A project with the name 'textblast' already exists in your account

{
  "data": {
    "addProject": null
  },
  "errors": [
    {
      "locations": [
        {
          "line": 2,
          "column": 9
        }
      ],
      "path": [
        "addProject"
      ],
      "code": 2003,
      "message": "A project with the name 'textblast' already exists in your account",
      "requestId": "eu-west-1:system:cj94sd7eh000a0172vspxze7d"
    }
  ],
  "status": 200
}

Get in touch if you need help: https://www.graph.cool/forum
To get more detailed output, run $ export DEBUG="*"

@timwis Yes the data is persisted even after removing the containers. I know there is a better way to delete the persisted data but I just resorted to resetting Docker in the Docker settings (Is there a command to delete all the persisted data?). This effectively deletes the VM and recreates it.

@marktani "For now, you can remove the docker containers, which will delete all local Graphcool services irreversibly." will not work because the data is persisted on the VM even after a kill.

Thanks, but I think the better way is to find out where the volume is persisted locally by looking at the docker-compose.yml file, then deleting the local directory/file. Do you know where we can find the docker-compose.yml file?

gc local eject
The persisted folder is located relatively on the VM. I just didn't have the time to research as I just needed it once for now.

That didn't quite reveal the persisted volume location. Here's how I nuked it. Note that it will nuke any other docker containers.

# stop all running containers
docker stop $(docker ps -a -q)

# remove all running containers
docker rm $(docker ps -a -q)

# remove all dangling volumes
docker volume rm `docker volume ls -q -f dangling=true`

using docker ps -f name=local -a -q (or the name of your cluster instead of 'local') would limit this to the docker containers of the cluster you want to eradicate only.

This issue has been moved to graphcool/graphcool-framework.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thomaswright picture thomaswright  路  3Comments

dohomi picture dohomi  路  3Comments

tbrannam picture tbrannam  路  3Comments

schickling picture schickling  路  3Comments

marktani picture marktani  路  3Comments