oxidecomputer / falcon

Fast Assessment Laboratory for Computers On Networks
Mozilla Public License 2.0
5 stars 2 forks source link

serial: "dumb" terminal and raw mode for exec #80

Closed dancrossnyc closed 1 month ago

dancrossnyc commented 1 month ago

Try to make "exec" look as much like a pipe as possible.

rcgoodfellow commented 1 month ago

Looks like something broke in the time crate dependency. I've bumped this dep on main, so a rebase should fix the build issue here.

dancrossnyc commented 1 month ago

Thanks; looks like CI is happy. I'll chat with @elaine-oxide about running this to test before merging; I don't know enough about Falcon and how its is used well enough to know whether these changes would impact other use cases.

elaine-oxide commented 1 month ago

The fix worked when I used this github repo branch raw-serial with my latest a4x2 deployment.

$ customer_edge_addr=$(./a4x2 exec ce \
    "ip -4 -j addr show enp0s10 | jq -r '.[0].addr_info[] | select(.dynamic == true) | .local'")

$ echo $customer_edge_addr | cat -v
172.20.2.192
andrewjstone commented 1 month ago

I seem to be stuck bringing up my VMs with the raw-serial branch. I'm in a loop of instance ensure ...

andrewjstone commented 1 month ago

I seem to be stuck bringing up my VMs with the raw-serial branch. I'm in a loop of instance ensure ...

User error. I had my editor open in another tmux session which uses rust-analyzer, and I don't have enough RAM to run RA and a4x2. Trying again with the editor/RA shut down.

andrewjstone commented 1 month ago

Alright, after running main for omicron and trying again initialization completes, but then I see the following at the end of the a4x2 launch:

Error: g0: init exec: [sc] g0: Unexpected websocket message

I'm using the latest of everything. I ran through all the prereq steps (except updating the arista and softnpu artifacts), updated my host, and built with latest omicron on main. I built a4x2 using the raw-serial falcon branch.

andrewjstone commented 1 month ago

Because of the aformentioned problem with launch, I cannot connect to g0 over the serial port:

  a4x2 git:(main) ✗ ./a4x2 serial g0
Entering VM console.
Use ^q to exit.
Press enter to continue.
Error: failed to create serial websocket stream

Caused by:
    0: failed to create serial websocket stream
    1: IO error: Connection refused (os error 146)
    2: Connection refused (os error 146)
➜  a4x2 git:(main) ✗
➜  a4x2 git:(main) ✗ ./a4x2 serial g0
Entering VM console.
Use ^q to exit.
Press enter to continue.
Error: failed to create serial websocket stream

Caused by:
    0: failed to create serial websocket stream
    1: IO error: Connection refused (os error 146)
    2: Connection refused (os error 146)

I can connect to g1 fine, although I don't see sled-agent running.

andrewjstone commented 1 month ago

Damnit, I was on an old checkout of a4x2. Sigh. I'm trying again. I'm sure it works since @elaine-oxide already verified things, but now I'm on a mission.

dancrossnyc commented 1 month ago

Damnit, I was on an old checkout of a4x2. Sigh. I'm trying again. I'm sure it works since @elaine-oxide already verified things, but now I'm on a mission.

C'mon, Maverick! You can do it!

andrewjstone commented 1 month ago

Damnit, I was on an old checkout of a4x2. Sigh. I'm trying again. I'm sure it works since @elaine-oxide already verified things, but now I'm on a mission.

C'mon, Maverick! You can do it!

Same issue! I'm going to try with a4x2 main and see what happens.

andrewjstone commented 1 month ago

Damnit, I was on an old checkout of a4x2. Sigh. I'm trying again. I'm sure it works since @elaine-oxide already verified things, but now I'm on a mission.

C'mon, Maverick! You can do it!

Same issue! I'm going to try with a4x2 main and see what happens.

found an old sled-agent hanging around in cargo-bay on g0. One more time with raw-serial

andrewjstone commented 1 month ago

Damnit, I was on an old checkout of a4x2. Sigh. I'm trying again. I'm sure it works since @elaine-oxide already verified things, but now I'm on a mission.

C'mon, Maverick! You can do it!

Same issue! I'm going to try with a4x2 main and see what happens.

found an old sled-agent hanging around in cargo-bay on g0. One more time with raw-serial

No cigar. I'm losing it.

andrewjstone commented 1 month ago

I reinstalled propolis after seeing a core and voila, a4x2 came up.

dancrossnyc commented 1 month ago

Good to go. Thanks, @andrewjstone !