mlogin(1)

πŸ“¦ version 5.4.2, in nixos 26.05, nixpkgs unstable

πŸ’… mlogin(1) β€” the Manta interactive session client, bestie

okay so real talk: this is a page from the Manta Commands manual, and it's about mlogin. yes the name is a little giving "m'lady" but ignore that, the tool itself is iconic. let's get into it 🫢

✨ NAME ✨

mlogin β€” manta interactive session client. that's it, that's the whole name. short, sweet, slays.

✨ SYNOPSIS ✨

mlogin [OPTION...] [OBJECT]

literally just the command, some options if you're feeling fancy, and an optional object. we love a low-effort syntax πŸ’–

✨ DESCRIPTION ✨

so mlogin lets you spawn an interactive job in Manta. once it's running, your terminal gets attached to the remote process running inside that job, via a shell session tunneled through HTTPS. conceptually? very SSH-coded. iykyk πŸ”₯

interactive sessions are lowkey the best way to debug a new job script in-situ (fancy word, means right where it lives), or to just vibe with and explore the compute zone environment hands-on. it can also slot right into a workflow using interactive terminal utilities on large Manta objects, with zero need to download or transfer the data first β€” e.g. running mdb (the Modular Debugger) on crash dumps and core files. no downloads, no drama. πŸ’…

now, the important part, the vibe check on when your session dips πŸ‘‘:

  • your mlogin session terminates when the top level process has exited (usually the interactive shell, unless you used the -c option).
  • ...and all references to that process's controlling terminal have also been closed.
⚠️ beware bestie: if you fork a background process and then exit the shell, that background process (and the job!!) may keep running if they hold the terminal open 😭. you may need to cancel the job in order to stop it. not me learning this the hard way.

also note: mlogin makes use of publicly-readable assets stored under the "poseidon" account, which is provided by the system. (not us, the system. we're just borrowing. thank u poseidon 🐚)

✨ EXAMPLES ✨

πŸŽ€ the default mode

the default mode of mlogin is to create a reduce job with no input keys. this job has no input data, but it does get you a shell running in a Manta compute zone. free real estate honestly.

$ mlogin
 * created interactive job
 * waiting for session... established
user@manta # ptree $$
91352 zsched
  2701  ./node lib/agent.js
    2715  /bin/bash --norc
      2735  ptree 2715
user@manta # exit
 * remote process exited
 * cleaning up resources...
 * session complete

look at that process tree. the way it just... nests. gorgeous. πŸ¦‹

🧚 a more complicated use

a more complicated use of mlogin would be crashdump analysis with mdb, and honestly? this is main character energy:

$ mlogin -c 'mdb /manta/user/stor/vmcore.1' /user/stor/vmcore.1
 * created interactive job
 * waiting for session... established
Loading modules: [ unix genunix specfs dtrace mac ]
> ::status
debugging crash dump /manta/user/stor/vmcore.1 (64-bit)
operating system: 5.11 joyent_20130226T234312Z (i86pc)
panic message:
BAD TRAP: type=e (#pf Page fault) rp=ffffff00b8e01070 addr=7b0
> $q
 * remote process exited
 * cleaning up resources...
 * session complete

a whole crash dump analyzed without moving a single byte. we stan a remote-debugging queen 🌸

✨ OPTIONS ✨

the options are supported (and yes, we're doing all of them, i don't skip):

  • -a, --account login β€” authenticate as account (that's the login name, bestie).
  • -c, --command shell_command β€” run shell_command instead of the default shell. this gets passed to bash -c inside the interactive job, so you can run something other than the default interactive shell. especially useful when you're providing a script or program to run via --assets. 🫢
  • --disk disk β€” override the OS quota, and use the specified amount of disk. measured in gigabytes. don't go feral with it.
  • -e, --escape escape_character β€” sets the escape character for this mlogin session. this character is recognised immediately following a carriage return, and it lets you perform a session control function. here's the tea:
    • if the escape character is followed by a period (.), the session will end.
    • if it's followed by a question mark (?), it prints a list of available escape characters.
    • passing "none" to the -e flag disables the escape character entirely. no escape. just vibes. πŸ’€
  • -h, --help β€” print a help message and exit. the classic.
  • --image version β€” specifies an image version semver to use in job phases. must be specified as a semver string (default is ~1.0). semver or it didn't happen ⭐
  • --init command β€” specifies a command to execute in the compute zone. this command will be executed prior to starting the interactive job. useful for setup, etc. (the "etc" is doing so much work there ngl)
  • -i, --insecure β€” this option explicitly allows "insecure" SSL connections and transfers. all SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. so like, it's opt-in chaos πŸ™ˆ
  • -k, --key fingerprint β€” authenticate using the SSH key described by fingerprint. the key must either be in ~/.ssh or loaded in the SSH agent via ssh-add. pick a lane, key.
  • --memory memory β€” override the OS size, and use the specified amount of DRAM. measured in megabytes. give the girl some RAM πŸ’œ
  • --role=ROLE,ROLE,... β€” specify which roles to assume for the request. yes, plural, comma-separated, stack 'em. πŸ”₯
  • -s, --assets path β€” specifies an asset to make available in the compute zone.
  • --user user β€” authenticate as user under account. subuser hours ✨
  • -u, --url url β€” Manta base URL (such as https://us-central.manta.mnx.io). tell it where to go. πŸ¦‹
  • -v, --verbose β€” print debug output to stderr. repeat the option to increase verbosity. repeat it. again. again. verbose is a lifestyle πŸ’…
  • -q, --quiet β€” don't print session establishment status messages. silence. peace. πŸŽ€

✨ ENVIRONMENT ✨

the environment variables that stand in for flags, because sometimes typing is hard (relatable):

  • MANTA_USER β€” in place of -a, --account.
  • MANTA_SUBUSER β€” in place of --user.
  • MANTA_KEY_ID β€” in place of -k, --key.
  • MANTA_ROLE β€” in place of --role.
  • MANTA_URL β€” in place of -u, --url.
  • MANTA_TLS_INSECURE β€” in place of -i, --insecure.

and one lil bonus fact: the shortcut ~~ is equivalent to /:login where :login is the account login name. cute shorthand, no cap. 🌈

✨ BUGS ✨

  • DSA keys do not work when loaded via the SSH agent. that's it. that's the bug. DSA found dead in a ditch πŸ’€

report bugs at Github ⟨https://github.com/TritonDataCenter/node-manta/issues⟩ β€” they're lovely, be nice.


okay that's the whole page, you're basically a Manta girlie now πŸ§šβ€β™€οΈ this gem dropped from Manta back in August 2017 and the mlogin(1) page is still serving looks. go spawn a job, bestie β€” slay πŸ’–πŸ‘‘

πŸ“¦ where this page comes from