-
gonzosysadm[m]
is there a modern recommended way of running the system without a usb stick?
-
jperkin
yeh use piadm to install to disk
-
gonzosysadm[m]
awesome, thx
-
gonzosysadm[m]
what is the right thing to toggle in a svc manifest to not make a service start by default? i have a custom smf service but it should only be run manually and doesn't need to be run after booting
-
gonzosysadm[m]
also, is there any built-in way for a(nother) service to detect that it's being invoked during boot? i'd like this service to run exactly once, after SMF comes up, and svcadm enable'ing it later shouldn't be possible. i'm sure i can do it manually by parsing some uptime-related thing, but i'm wondering if there's a built-in way
-
jbk
you can indicate in a manifest that it's disabled by default, so you'd have to explicitly enable it to run
-
jbk
and for most services, if they're enabled, they get run after any of their dependencies are satified during the boot process
-
gonzosysadm[m]
w
-
gonzosysadm[m]
<jbk> "and for most services, if they'..." <- ho?
-
jbk
you have to create a manifest, and then there's a spot in /opt (I tihnk /opt/custom, but i'd need to look) that'll import it during the boot process
-
gonzosysadm[m]
yes, i know that. i meant how to make the service not autostart (i want the manifest to get imported (that's /opt/custom/smf), but the service to default to disabled)
-
Smithx10
Does Flexible Disk not work in the portal?
-
teutat3s
Any SmartOS C devs around that could take a look at this strace?
-
teutat3s
-
teutat3s
-
teutat3s
This is the relevant line:
-
teutat3s
setsockopt(8, SOL_IP, IP_MTU_DISCOVER, [2], 4) = -1 EINVAL (Invalid argument)
-
danmcd
Dumb question --> what numeric value is SOL_IP in Linux?
-
danmcd
According to this:
-
danmcd
-
danmcd
It's "0" and that is an illegal value in general.
-
danmcd
case LX_IPPROTO_IP:
-
danmcd
that's how IP_MTU_DISCOVER gets shuffled.
-
danmcd
One could argue we need to handle SOL_IP == 0 in LX (never mind the other definitions of SOL_* that Linux has done).
-
danmcd
See lx_setsockopt()'s definition for where one *might* need to fix that.
-
danmcd
I've not checked the latest POSIX or Austin defs, but SOL_IP seems.... Linux-y?
-
danmcd
Regardless, that it's 0 is why you're getting EINVAL.
-
danmcd
If you change SOL_IP to IPPROTO_IP that'll fix it in the source program.
-
teutat3s
danmcd (LIBERA-IRC): Thank you, the source program is caddy, a reverse proxy written in go
-
jperkin
fwiw I built caddy natively, just needed a small patch to avoid SO_REUSEPORT
-
jperkin
seemed to run fine
-
danmcd
Sometimes I think go is a stealth project to force the LInux ABI on the world whether it likes it or not...
-
teutat3s
jperkin (LIBERA-IRC): Did you try to start caddy v2.6.x in an lx-brand zone? see
smartos.topicbox.com/groups/smartos…-x-crashes-in-default-configuration
-
gonzosysadm[m]
what's the proper way to set a v6 gateway for a zone? "gateways" doesn't seem to take ipv6
-
jperkin
teutat3s: no in a native zone
-
teutat3s
jperkin (LIBERA-IRC): ah I didn't read that part well, gotcha
-
danmcd
gonzosysadm[m]: That "gateways" doesn't take v6 is a bug, IIRC. You can, post-setup, use `route -p add -inet6 default <router-v6-addr>` which will have it persist across zone boots.
-
danmcd
(I take it you don't wanna use NDP in this zone?)
-
danmcd
(Sorry, Router Discovery?)
-
gonzosysadm[m]
danmcd: noted .. seems the bug is open since 2016 too, heh
-
gonzosysadm[m]
unrelated -- i need to use the same mac address for a zone as the one on the physical interface for the gz, but i get msg: dladm: vnic creation over i40e0 failed: MAC address reserved for use by underlying data-link when creating the zone
-
danmcd
Yeah... "Make things v6-happy" is a longstanding issue that will require A Serious Effort.
-
gonzosysadm[m]
multiple ips to a mac works, but the question is, does it work between a zone and the gz too?
-
danmcd
No.
-
danmcd
The ONLY way to have a physical NIC's mac address is to have that physical NIC itself assigned to the netstack (zone) you want.
-
danmcd
If you have igb0 in the global zone, NO ZONE CAN ALSO HAVE igb0, for example.
-
danmcd
On my home machine, I assign igb1 directly to the router zone (using "devices" in zonecfg(8)).
-
danmcd
"MAC address reserved for use by underlying data-link" ==> means i40e0 owns that MAC, full-stop.
-
danmcd
If you need it badly you'll need to assign i40e0 directly to the zone, and we don't allow that using the SmartOS vmadm(8) tooling.
-
gonzosysadm[m]
yeah this is a machine on hetzner, they got some silly stuff going on with mac addresses.
-
gonzosysadm[m]
problem is i also need the mac for the gz. i'm trying to avoid having to do the routing on the gz
-
danmcd
Also of note, if you assign the physical NIC to the zone, any vnic on top of it can be snooped by root@zone.
-
gonzosysadm[m]
unfortunately all packets going out of the machine need to have the right mac, or they get very unhappy
-
danmcd
(My router zone is the ONLY one that uses igb1, in my example.)
-
teutat3s
danmcd (LIBERA-IRC): I'm confused, IPPROTO_IP looks like it's of the numeric value 0, too?
github.com/TritonDataCenter/illumos…ommon/brand/lx/sys/lx_socket.h#L211
-
danmcd
Shit... hang on pls.
-
danmcd
Internally too...
-
danmcd
sys/lx_socket.h:#define LX_IPPROTO_IP 0
-
danmcd
Hmmm, I wonder...
-
danmcd
Assuming you can just make this happen by running the program, I will find a DTrace script I'd like you to run.
-
danmcd
-
teutat3s
danmcd (LIBERA-IRC): sure, I did find this one and made it run before
docs.smartos.org/lx-branded-zones/#probing-socket-options
-
danmcd
chmod it to 0755, and run it as "./downstack.d lx_setsockopt"
-
danmcd
It's a Big Hammer, and it will produce a lot of output.
-
danmcd
You can also insert an "exit();" line on line 14 (in the $1:return probe) for a single capture.
-
danmcd
So run downstack.d lx_setsockopt
-
danmcd
once it shows N probes enabled (N will be large)
-
danmcd
Run the LX program that's failing.
-
danmcd
The D script will follow the bouncing callstack down and back up again. We can see which exact function returns an error.
-
danmcd
Then one can source-dive in that function to figure out WTF.
-
danmcd
(you can also edit the script to narrow its reach to, say, just the lx_brand module)
-
teutat3s
hmmm dtrace: failed to compile script ./downstack.d: line 3: probe description ::lx_setsockopt:entry does not match any probes
-
teutat3s
Ah, does it need to be run from the global zone?
-
danmcd
Yes.
-
danmcd
Sorry, should've been clear about that.
-
danmcd
Oh shit, it may produce too much output if you have already-running other LX zones (or even processes).
-
danmcd
(Like I said it's a big hammer.)
-
teutat3s
-
teutat3s
Is that some useful output?
-
teutat3s
The CN seems to hang a bit, I might need to redirect it to a file to get all the output, if it looks like somethings missing
-
danmcd
That shows a successful return of lx_setsockopt() (returns 0).
-
danmcd
The CN hangs because that enables probes on ALL KERNEL FUNCTIONS>
-
danmcd
Like I said it's a Big Hammer.
-
danmcd
Lemme see if I can make some mods...
-
danmcd
The last two probes, both have headers of:
-
danmcd
::entry
-
danmcd
and
-
danmcd
::return
-
danmcd
Change those to be:
-
danmcd
fbt:lx_brand::entry
-
danmcd
and
-
danmcd
fbt:lx_brand::return
-
danmcd
that'll lessen the impact
-
danmcd
(Pardon latency... it's a Triton release week and I'm high-jitter Thursday afternoon and GONE until Monday when I'm at MNX.)
-
teutat3s
danmcd (LIBERA-IRC): No worries, thank you for looking into this with me
-
teutat3s
-
danmcd
Found it.
-
danmcd
One lx_setsockopt_ip call returns 0x16 == 22 == EINVAL.
-
danmcd
Hard to figure out why right this second.
-
danmcd
That function Should Work. I've followed the bouncing codepaths.
-
danmcd
SOrry I can't help out more right this moment.
-
teutat3s
danmcd (LIBERA-IRC): thank you for your time (:
-
Smithx10
bahamat: The triton portal passes in options.dataset, and cloudapi doesn't know to put it on disks[0].image_uuid at
github.com/TritonDataCenter/sdc-clo…pi/blob/master/lib/machines.js#L553
-
Smithx10
guessing triton portal should have options.image for input to api.Create or || params.dataset in cloudapi
-
bahamat
Smithx10: What conditions trigger this? And what's the failure mode? I'm unfamiliar with this issue.
-
Smithx10
When a user tries to use a Flexible disk package I believe
-
bahamat
And is this piranha, or adminui?
-
Smithx10
Piranha *
-
bahamat
OK, we'll take a look at that and see if we can reproduce it.
-
travisp
Smithx10: Which version of Piranha?
-
bahamat
Smithx10: And they're doing bhyve, right? flexible disk isn't supported for kvm, and makes no sense for lx/joyent brand
-
Smithx10
yea, bhyve
-
Smithx10
[root@5eaba95a-7637-6322-9d0a-9d08095d0db9 /opt/portal]# cat /opt/portal/package.json | json version; 6.0.1
-
bahamat
OK, yeah, we'll try to see what's going on if we can.
-
bahamat
Good timing, actually, because we're preparing a new release of piranha
-
Smithx10
yea, I just noticed that the create worked via node-triton, and not the portal with the same image and package. When I console logged the incoming requests into cloudapi from each, thats when I noticed
github.com/TritonDataCenter/sdc-clo…pi/blob/master/lib/machines.js#L553 only acted on image. Piranaha was passing params.dataset.
-
bahamat
Can you send me your package json out of papi?
-
bahamat
Or to travisp
-
bahamat
Just to make sure there's nothing we're missing in our testing.
-
Smithx10
package api? correct
-
bahamat
Yeah
-
bahamat
So from the headnode, sdc-papi /packages/<package uuid>
-
bahamat
What you get from `triton package get -j` isn't exactly the same thing as what's in papi. CloudAPI will gloss over some of the details that end users mostly don't care about.
-
Smithx10
-
bahamat
Smithx10: We'd also like to see your config.pro.json, but there's secrets in there so scrub them.
-
bahamat
And probably give me an msigned link
-
bahamat
PM it to me