-
danmcd
release-20220922 has been announced. Folks who serve NFS (zone or global) should make sure their hostname is in name services or else mountd won't start.
-
jbk
maybe soon(ish) the zfs alias stuff will be in too :)
-
bahamat
Unlikely...
-
bahamat
I talked to both Alex and Josh about it, and superficially it seems easy, but the more you use it, the more lies you need to tell in order for things to work.
-
jbk
well it'd probably need some plumbing for smartos zones
-
bahamat
It's like a fractal of edge cases.
-
jbk
but it could be used for the 'data' dataset
-
bahamat
But it's not just the dataset. You need to fabricate a pool.
-
jbk
and how often does anything run a zpool command inside a zone?
-
bahamat
Plenty often.
-
jbk
for what? the only thing you can do with _zpool_ in a zone is basically 'list' or 'status'
-
bahamat
list shows size, compress ratio, all the properties, etc. What to do with them?
-
bahamat
status shows device geometry.
-
bahamat
Then there's zpool iostat
-
jbk
and why would you be looking at that from within a zone vs. the gz (where none of this applies)
-
bahamat
But so many people do.
-
bahamat
In JPC we had customers that were monitoring disks, and would open tickets with us if there were errors.
-
bahamat
Like, we already knew and were handling it. But they'd open a ticket anyway.
-
bahamat
But like what all breaks if we just shut that stuff off inside a zone? No idea, because it's always been there.
-
jbk
if it's a new brand (it's not like it does this automatically -- you have to specify an alias in the zonecfg)..
-
bahamat
As in vmadm create brand=not-joyent?
-
jbk
there's already dones for kvm and bhyve.. could call it 'mnxio' :)
-
jbk
(e.g. joyentv2) or such..
-
bahamat
Yeah, but if the difference between an mnx brand and joyent brand is that a ton of zfs utilities are broken, nobody will use it.
-
bahamat
At any rate, it's extremely unlikely that it'll be in SmartOS first. If it shows up in gate, we'll make it usable in SmartOS.
-
jesse_
will a newer platform image show more in 'imgadm avail' or is the list always up-to-date and trying to use images requiring newer platform will just fail?
-
nahamu
do you mean 'piadm avail' ?
-
jesse_
...platform just fail
-
jesse_
imgadm
-
jesse_
there are minimum platform requirements for images
-
nahamu
Ah.
-
jesse_
not sure how it is used
-
nahamu
Probably in Triton for scheduling.
-
jesse_
well, if a lx-zone requires more support from the platform...=)
-
neuroserve
jesse_ : afaik 'imgadm avail' gives you a current list - including all available images - regardless of minimum platform requirements - those are only checked while provisioning an instance - you will not be able to provision it if your platform is older than the minimum platform required for that image
-
jesse_
so... updating the PI won't help me and I'll have to roll my own lx image (urgh)
-
jesse_
expect cursing here about the PI built-in scripts for different distros=)
-
bahamat
jesse_: What is it that you're wanting?
-
jesse_
something new linux
-
jesse_
(not feeling like doing updates to it anytime soon)
-
bahamat
Is there a distro called literally "something new"?
-
jesse_
probably ubuntu 22.04, as I've been using it in other contexts lately (due to native zfs support)
-
jesse_
bahamat, not-centos-not-ubuntu-20.04
-
bahamat
ubuntu 22 shouldn't be too hard
-
jesse_
I wonder if I have the energy to get almalinux running
-
jesse_
that's what I'd most likely run on lx in the long run
-
jesse_
I had some problems with ubuntu 21.10, but no idea what they were
-
jesse_
I assume I'll find out if 22.04 fixed those=)
-
jesse_
how is the lx image build repo nowadays? it didn't do something the last time and it was easier to do all manually
-
bahamat
There's two parts to it.
-
bahamat
-
bahamat
That's a fork of OmniOS's LX image repo, but there's currently no changes in ours.
-
bahamat
-
bahamat
which takes a tarball produced by the lx-images repo and converts it to a SmartOS image.
-
jesse_
it already has ubuntu 22.04, so it'll probably work without much hassle
-
bahamat
Yeah, we should be able to just run the conversion and be done.
-
jesse_
bahamat,
github.com/TritonDataCenter/smartos-lx-img-builder: readme should probably tell in what environment to run it (gz/zone?) and steps to get the target/debug/smartos-lx-img-builder?
-
bahamat
I agree.
-
bahamat
And since I need to re-figure that out, I'll write it down this time :-)
-
jesse_
oh, it's rust=)
-
bahamat
IIRC, it works fine in a zone
-
bahamat
The main requirement is a delegated dataset.
-
jesse_
having img-builder as an img wouldn't be a bad idea?
-
bahamat
Maybe.
-
jesse_
my previous solution used docker (OCI) images as base and just edited their filesystems
-
bahamat
Yeah, I think that's what these actually do as well.
-
jesse_
easy way to get plenty of application images without re-doing the dockerfiles
-
jesse_
last time I checked omnios did get the container tars from the releases and did the base image properly
-
jesse_
my solution was the less 'proper' one, as there was no shared parent of OS image
-
jesse_
uh, no, and yes
-
jesse_
omnios uses dockerfiles to setup the images=)
-
jesse_
bahamat, for smartos-lx-img-builder: a description what it does/adds to the images would be nice
-
bahamat
Yeah, I'm going to add that.
-
jesse_
"adds joyent service to systemd" etc.
-
jesse_
smartos really needs native podman support
-
jesse_
(I ditched docker-the-runtime-and-command couple of years ago and after using podman for a while all these dockerfile/smartos image systems are a major pita...)
-
bahamat
vmadm will always be the primary way to run instances on SmartOS.
-
bahamat
It's necessary for Triton
-
bahamat
But we've always wanted to make it easier to run lx containers with it.
-
bahamat
jesse_: give this a try:
-
bahamat
-
bahamat
-
bahamat
If that works out for you, I'll publish it.
-
bahamat
I haven't tried it at all, I just ran the conversion.
-
jesse_
bahamat, not the instace things
-
jesse_
bahamat, to build images
-
jesse_
*not to instance
-
jesse_
basically a little bit better zlogin
-
bahamat
Well then podman needs to have a vmadm (or at least zonecfg/adm) backend for running them
-
jesse_
yeah, that's why I said "smartos really needs native podman support"=)
-
bahamat
What you mean is podman needs native smartos support
-
bahamat
It's going to have to be on them to want SmartOS support.
-
bahamat
There's no way we can shove it down their throats if they don't want it.
-
jesse_
you can "podman create from scratch" that gives you an image with no fs (smartos: /native there?). then just "podman $ctr <any shell command>" to run commands in the context of root-of-that-image without any services running, and "podman mount $ctr" to mount the fs (in smartos just /zones/$ctr/root/)
-
jesse_
mostly the second part is thing I miss
-
bahamat
Are you saying this works now?
-
jesse_
it works in linux with podman
-
jesse_
(hence, "smartos really needs native podman support")
-
jesse_
I'm seeing myself running more and more bhyve just because the build-an-image tooling is so bad on smartos
-
bahamat
So far it doesn't seem like there's anything that SmartOS can do to support podman.
-
bahamat
It seems like it's the other way around.
-
jesse_
like you said: podman devs won't do anything
-
jesse_
so, "smartos really needs native podman support", mentioned here
-
bahamat
So I don't really know what you're asking for.
-
jesse_
that's probably part of the problem
-
jesse_
you don't even see the problem
-
jesse_
(that was just a neutral statement)
-
bahamat
It's not that I don't see the problem. I don't see how you're suggesting smartos be modified to accommodate podman.
-
jesse_
suggesting getting smartos support into podman
-
bahamat
How exactly does smartos need to behave differently for that to happen?
-
jesse_
it's not 'smartos' development, but then again bhyve wasn't, either?
-
bahamat
I don't really think that's the same thing.
-
jesse_
smartos devs need to add the support. Possibly have some tuning of being able to run things "in a zone" without the zone being 'running'
-
jesse_
it's the same thing, see: bhyve
-
jesse_
see: java
-
jesse_
see: node
-
jesse_
see: ...
-
bahamat
Ok, well you're free to send me a pull request any time you want.
-
jesse_
...I was expecting this=)
-
bahamat
I can't tell if you're asking me to modify smartos or if you're asking me to modify podman.
-
jesse_
if I had the time to do all the runtime support on smartos, I'd start with openjdk
-
jesse_
...which I've done
-
jesse_
and I no longer have the time for
-
bahamat
I'm not trying to be obstructionist. Like, let's say I agree wholeheartedly and am ready to sit down and write code...what is it supposed to *do*?
-
jesse_
I'm asking podman to work on smartos as image-building tooling
-
bahamat
Then I think what you're asking for is for the podman developers to add support for running on SmartOS.
-
jesse_
I think the first step would be to get podman on some linux and see how it works and do some exploration to see what I'm even talking about
-
bahamat
And like I said, even if I went through all the work of adding SmartOS support to podman, I doubt they'd be willing to merge it just because I asked.
-
jesse_
there are (at least parts of) podman that are services that can be added
-
jesse_
the build thingy probably less so, it's probably married to linux namespaces to some degree
-
jesse_
(I haven't looked)
-
bahamat
It would need to add zones as a backend.
-
jesse_
looking from other angle, zones backend would be need to be added
-
bahamat
That's...exactly what I said.
-
jesse_
it's from the opposite direction
-
jesse_
you said podman needs to add one, I said smartos needs to add one
-
bahamat
Smartos already has a zones back end
-
jesse_
not with the interface required for podman
-
jesse_
if there even exists one yet
-
jesse_
if it doesn't it needs to be added
-
jesse_
etc.
-
bahamat
So you're suggesting zones be modified or replaced with something that's compatible with linux namespaces for the purpose of running podman on SmartOS?
-
jesse_
no
-
jesse_
in interface glue in between podman and smartos zones
-
jesse_
as +
-
bahamat
lx brand zones are already that glue.
-
jesse_
they are the _runtime_
-
bahamat
But, lx doesn't support nesting.
-
jesse_
(and not a really good one at that)
-
jesse_
what I'm talking about is actually _making_ the zones
-
jesse_
this has always (since docker was released) been the achilles heel of smartos
-
jesse_
there is no easy way to make the images
-
jesse_
(there is a way, but it's not something that's used easily)
-
jesse_
in real-life environments I've seen, there are tens of different containers, when zones act more like the hw/virtual machines the containers are deployed on
-
jesse_
(real-life linux/container environments)
-
bahamat
Well, an image is a zfs dataset.
-
bahamat
So it's just a matter of having a dataset and dumping files onto it.
-
jesse_
but the tooling is not there
-
jesse_
let's take an example, how will you build and image that is this dockerfile:
github.com/TritonDataCenter/lx-imag…lob/master/centos-stream/Dockerfile
-
jesse_
that's like 3-4 podman commands
-
bahamat
Ok, fine, but modifying the OS so that it behaves like a completely different OS is a tremendous undertaking.
-
jesse_
(and yes, the commands _are_ that dockerfile, it's just two different toolings doing the same thing)
-
jesse_
it's not about the os
-
bahamat
And trying to convince a 3rd party that they should support my OS is also not easy.
-
jesse_
because the podman interface is 'instantiate an empty container', 'copy files to a container', and 'run commands like you were in the container'
-
jesse_
you're not convincing them
-
jesse_
you're doing the work
-
jesse_
that's what I call 'adding a native support'
-
jesse_
(you being the abstract people developing smartos)
-
bahamat
Yes, then I send them a pull request and they say "thanks but no thanks"
-
jesse_
then you make the things that they didn't want an interface for support for other platforms
-
jesse_
submit that and ship your implementation in the PI
-
bahamat
I don't know if you've ever maintained an open source project before, but generally people don't like people who are not part of the project suggesting large new subsystems.
-
jesse_
example: you now
-
jesse_
yes, I know
-
bahamat
You still haven't given any suggestions on how to change SmartOS so that podman just works unmodified.
-
jesse_
I've given up on using several oss software because their devs are poondering their own orb instead of looking around what's needed
-
jesse_
bahamat, 'left as an exercise for the readers', as in if I did, it'd be in the form of a pull request
-
bahamat
All you've said so far is "make it work". Ok, what does that entail?
-
jesse_
'I have not looked into it to give you steps'
-
jesse_
I'm not your project manager
-
jesse_
I can give you input on what is needed or would be goood
-
bahamat
Even "looking into it" is going to take days to weeks at minimum.
-
jesse_
hours to days
-
jesse_
yes
-
jesse_
and it would need someone to either to get approval on it or just do it
-
bahamat
Sounds pretty simple, then, why not volunteer for it?
-
jesse_
but for to that happen, someone has to give the idea of 'this would be really good'
-
jesse_
I'd love to, but my first priority would be to get openjdk to run again
-
bahamat
ptribble has taken care of that. We've got working openjdk17 builds.
-
jesse_
and the easiest way is to just ditch smartos and use the time to make podman's network stack work even slightly
-
jesse_
bahamat, does it have ZGC?
-
jesse_
if it doesn't, it's pretty much useless for production use
-
jesse_
because a bhyve with linux openjdk will dance around it
-
jesse_
(no, it's not easy, did dig into it)
-
bahamat
If it's a native part of openjdk, then I think it probably works, but I wasn't involved with that work so I can't say for certain.
-
jesse_
it's native part
-
jesse_
but there is only win and linux implementations of it
-
jesse_
and the whole build system will fight you to do #ifdef implementation
-
jesse_
if you copy it, you'll on the hook to manually do every single small commit yourself
-
jesse_
so, I know what I'm talking about
-
jesse_
podman is just some node(? possibly go?) interfaces implemented
-
jesse_
not €"#%€&%//%&€%# memory mappings in-a-hurry magicks
-
bahamat
It's go
-
jesse_
(and the platform-specific parts of ZGC are not in-a-hurry afaik)
-
jesse_
but it was more dramatic to claim that=)
-
jesse_
(and most of the openjdk problems are because of how they use c++ and their build system, but there's not much one can do about that)
-
jesse_
bahamat, ah, if you have podman-angst, try adding buildah support=)
-
jesse_
(it's the build part podman uses)
-
jesse_
bahamat, and only now I realize what I should have been using all this time... Obviously I use buildah commands for everything, but I just keep copy-pasting the prefix of the shell lines)
-
jesse_
(but podman uses internally buildah to run dockerfiles etc.)
-
jesse_
to add to the trinity, adding imgadm support to skopeo...
-
jesse_
(podman/buildah/skopeo is the redhat response to docker going pay-to-run-production, afaik)
-
jesse_
obviously the lines above were triggered of me copy-pasting lines from existing buildah scripts and realizing the prefix is buildah, not podman...
-
neuroserve
lists.freebsd.org/archives/freebsd-jail/2022-May/000129.html <- there seems to be an effort to port podman and buildah to freebsd...
-
jesse_
it'll still probably need smartos-specific massaging
-
blackwood821
In the vmadm man page for "cpu_cap" it says "percentage of a single CPU that can be used by the VM". If a CN has simultaneous multi-threading enabled, does "CPU" refer to a CPU core or a thread on the core?
-
jesse_
not sure if the zone model can handle 'run command in zone context without really starting up the zone'
-
jesse_
blackwood821, afaik, thread
-
blackwood821
jesse_: That's what I was assuming, hoping someone can confirm it
-
jesse_
I _think_ I've seen that with zones and bhyves with high load
-
jesse_
(monitoring from gz)
-
blackwood821
Is there anything in the global I can run to confirm that for a particular zones?
-
blackwood821
zone*
-
jesse_
prstat -Z?
-
jesse_
(and see how much a much-loaded zone gets)
-
jesse_
on an idle host... I don't know
-
blackwood821
jesse_: `prstat -Z -z <zone_uuid>` gives me one entry for the zone so would the percentage in the "CPU" column be the percentage of CPU of all the CPUs on the system?
-
jesse_
just "prstat -Z" will give you all load on the system
-
jesse_
may help or not help
-
jesse_
but what I remember looking at the numbers is 100% per thread
-
jesse_
bahamat, to get back to podman, eventhough that's not what i'm looking for, there are runc and crun implementations of the interface to actually run the container; implement either or see how to add your own=))
-
jesse_
(vmadm will do for my needs, most likely, eventhough it sucks like docker in setting bootup-sequence)
-
blackwood821
jesse_: Ok thanks.
docs.tritondatacenter.com/private-cloud/troubleshooting/cpu-usage seems to agree: "The percentage is the total across all CPUs (psrinfo). So, a value of 200 is equivalent to 2 virtual CPUs (a virtual CPU is either a core or a hyper-thread)."
-
jesse_
blackwood821, good that my memory agrees =)
-
blackwood821
Your memory serves you well
-
bahamat
runc is just a very thin wrapper around making a bunch of system calls.
-
bahamat
What you're actually proposing is adding linux namespaces to illumos.
-
jesse_
no, what I'm proposing is lying about them in relative terms like with lx
-
jesse_
and adding support in relation too that
-
jesse_
s/too/to/