TritonDataCenter / manta-thoth

Thoth is a Manta-based system for core and crash dump management
16 stars 7 forks source link

thoth should work inside a job #95

Closed jclulow closed 5 years ago

jclulow commented 10 years ago

At the moment, when run in the context of a manta job, thoth exits with this error:

jmc@manta # /opt/thoth/bin/thoth upload XXXXX
thoth: expected MANTA_KEY_ID environment variable to be set

We should be using the presence of MANTA_NO_AUTH=true in the environment to detect that we don't need to MANTA_KEY_ID to be set.

davepacheco commented 8 years ago

I ran into this again today. We had a Manta job task dump core. When that happens, the core file is automatically uploaded to Manta. It's an out-of-memory dump, so it's pretty large. To avoid copying it across the WAN just to copy it back into Manta, I was hoping to "thoth upload" it from an "mlogin" session on the job, but that doesn't work:

dap@manta # ./node_modules/.bin/thoth upload $MANTA_INPUT_FILE
thoth: expected MANTA_KEY_ID environment variable to be set

That's bogus. MANTA_KEY_ID doesn't need to be set inside of jobs because of the way we implicitly insert user's credentials into outbound requests.

chudley commented 7 years ago

As a workaround, @pgale61 found that if you export MANTA_KEY_ID=foo inside the mlogin session then thoth will work.

bahamat commented 5 years ago

https://cr.joyent.us/6844

I tested this by git cloning thoth, then npm install and patching it.

bbennett@manta # ./bin/thoth info 12868b596bb1fdd9d2332a9e97fc6a3f | head -2
thoth: using database at thothdb.svc.aed35417-4c53-4d6c-a127-fd8a6e55723b.us-east-1.triton.zone:28015 (configured from Manta)
{
    "name": "/thoth/stor/thoth/12868b596bb1fdd9d2332a9e97fc6a3f",
bahamat commented 5 years ago

Fixed in e5cd3551220c21afcbd1d9d94773d212e2b33800