-
gonzosysadm[m]
wiki.smartos.org/persistent-configuration-for-the-global-zone -- here it says: "/usbkey/ssh/sshd_config is in here so if you want to do things like require MFA or refuse Password login, you change it here and reboot" ... in FreeBSD i use "pam_google_authenticator-1.09,1 PAM module for two-step authentication from Google" to achieve that ... but the module does not seem to be available for smartos (at least the gz) on pkgsrc.
-
gonzosysadm[m]
so how does one go about setting up 2FA via TOTP for SSH logins on the GZ?
-
gonzosysadm[m]
also, what was the command to reread /usbkey/config ? so that i could re-apply the configuration without a long reboot
-
gonzosysadm[m]
also also (lol coffee) what is a modern tool to generate service manifests? back in the day manifold was the thing
-
gonzosysadm[m]
also also also, i'm sharing the administration of this gz with 2 other people, it would be nice not to have to share tmux sessions and what not. how much pain am I getting into if I try to create admin accounts and make them persist across reboots?
-
jperkin
for 2FA, we ship a duo package, but as yet don't provide a 32-bit version of it for the GZ to work with PAM - you might be able to bodge the regular version though in the meantime
-
jperkin
restarting smartdc-config _might_ reread /usbkey/config, but I can't guarantee it, and you get to keep both pieces if it fails (I'd just reboot tbh)
-
jperkin
for SMF I just copy/edit one of the many existing ones in pkgsrc, they're generally 99% identical
-
jperkin
there are docs on creating users in the gz, but again not recommended, you keep both pieces when it breaks, etc
-
jperkin
generally once you have multiple people administrating things you're better off with triton
-
jperkin
looks like the google-authenticator package in pkgsrc could do with an update, would also be interesting to know if it actually works!
-
nbjoerg
gonzosysadm[m]: serious question, but why use TOTP and not FIDO keys with split key?
-
nikolam
Did anyone notices that from, say, the begining of this year or so, console output in, say man and while searching man is very slow, much slower then before.. (on Smartos global zone, over SSH, but it is the same on VGS console)..
-
danmcd_
I don't know if mailing-list participant "thomas" is on here, but I apologize for mismerging vioscsi(4D) into SmartOS, and am constructing a deliverable (PI tgz, ISO, or USB) with a fix for it.
smartos.org/bugview/OS-8418 fix is
TritonDataCenter/illumos-joyent #425
-
barfield
So I did some googling, maybe not enough, but is there a packing list of opensource projects/dependencies with licensing for SmartOS/Triton/etc? Like a packing slip for PI's and API's/agent....blah blah
-
bahamat
Sort of...
-
bahamat
illumos-joyent and smartos-live are CDDL. Things in illumos-extra have licensing included
-
barfield
when I was at CA we had to distribute a list of opensource software that was in our dom0 hosts in order to repackage our proprietary stuff
-
bahamat
illumos-kvm is GPL, and IIRC illumos-kvm-cmd is also gpl? But I'm not 100% sure on that one.
-
bahamat
At California?
-
barfield
Yeah, I figured, but most of the binaries in /usr/bin,etc are illumos right?
-
barfield
Like to get gnu binaries you go through pkgsrc?
-
barfield
Computer Associates
-
bahamat
Stuff from illumos-extra are also in /usr/bin
-
barfield
I guess the general question should have been phrased like, besides KVM, are there GPL licensed binaries in the GZ?
-
bahamat
For Triton it's all MPL-2.0, or some of the node modules we produce are MIT. Each repo has its own license.
-
barfield
Cool so no separately licensed binary dependencies in the node projects?
-
bahamat
3rd party node modules are used under the 3rd party license, and the licence declaration should be included in the package.json for every node module.
-
barfield
Ah, you see my limited node knowledge now :)
-
bahamat
There's also a few other 3rd party things that are part of Triton. E.g., postgres for manatee, zookeeper (and by proxy Java) for binder
-
barfield
openjdk or sun/oracle?
-
bahamat
OpenJDK 8 currently
-
barfield
Good to know, I wouldn't have figured Joyent would repackage oracle java lol
-
barfield
Okay so I should be able in a sense just clone the github repo's and generate a list of whats included in the 'pi' under CDDL.
-
barfield
from illumos that is
-
barfield
Outside of bug fixes, drivers, enhancements,etc, the GZ doesn't get new binaries added regularly in my experience, or is that an incorrect assumption?
-
bahamat
No, it doesn't get new binaries added very often
-
barfield
Thanks man always a pleasure chatting
-
bahamat
New versions of existing things are much more frequent.
-
jperkin
not that you asked, but if anyone happened to want something similar for packages that are installed then "pkg_info -Q LICENSE '*' | sort | uniq"
-
barfield
Thank you jperkin, that is an excellent shortcut
-
barfield
I wonder if I can generate a decent list if it could be commited to illumos-joyent as a packing slip in the PI for others to use if needed
-
bahamat
It's something that would need to be generated on every build.
-
barfield
hmmm, so a build tool perhaps might be the better route
-
barfield
or a make target even
-
bahamat
Yeah.
-
barfield
Surprised this doesn't exist already, I'll go see if something already exists on github
-
bahamat
Compiling a static list is nice, but I wouldn't accept that as a pull request, because then it's perpetually on me to always update it every time.
-
barfield
What would you require to get it in? Like entirely automatic? I'm thinking packing slip with licenses and maybe even a hash column
-
bahamat
We do already ship a manifest which enumerates every file included on the platform image.
-
barfield
Aha
-
bahamat
entirely automatic
-
barfield
That might be all that I need
-
barfield
Where is it located?
-
barfield
usbkey?
-
bahamat
It's /usr/share/smartos/manifest
-
barfield
Wow I had no idea
-
barfield
Hopefully IRC is still archived somewhere on the web in case someone is looking for this in the future.
-
bahamat
I think the manifest file itself is the only file not included in the manifest.
-
barfield
hard to manifest yourself
-
bahamat
Because calculating its hash so that we can include the hash in the manifest is a tricky problem.
-
barfield
chicken+egg lol
-
barfield
jperkin: I maybe sending you a pkgsrc commit in the next couple of days. May need to DM with you though its for a pkg in the joyent repo
-
jperkin
you can just send a PR to pkgsrc-joyent
-
barfield
K
-
jperkin
I'll get around to renaming it at some point, need to sort out SUPERSEDES support in pkgin first
-
bahamat
Now, if you're going to cross reference that manifest with every file present on a running system, you need to know that some files are auto generated at boot, so wouldn't be in the manifest.
-
bahamat
And some things get modified during the normal course of operation, so the hash will differ
-
bahamat
(e.g., /etc/zones/index)
-
barfield
I'm not worried about dynamic changes
-
barfield
Mainly just binaries
-
barfield
Like binaries present on the system.
-
barfield
I know that we're using openssh as well which I believe is BSD licensed
-
barfield
So there must be some projects that are not CDDL included in the PI
-
bahamat
Well like I said, things that are in illumos-extra have their own license
-
bahamat
Also, not *everything* in illumos-joyent is CDDL. Bhyve, for example is BSD.
-
barfield
Also, following up on that CMON issue that I was having yesterday, I ran `cns-hook update_remotevm <uuid> <cmon.X.cns.X.io>` but the cert's are still not updating on remote zones. I just copied them manually for the time being
-
bahamat
-
barfield
Excellent
-
barfield
Sorry for all the questions I haven't dug into the source and done a build in ages
-
bahamat
Well, it uses sdc-oneachnode to copy the files over, so maybe look at that?
-
barfield
Yeah, I `set -x` before I ran it and saw the oneachnode commands run, but didn't pay enough attnetion to see if there was a failure. I'll give it another shot
-
barfield
I'll dig through the script some more too. Just thought you might know of an issue before I spent too much time on it.
-
barfield
anyways, thanks again, maybe I can return all the help you guys have given me in the future.
-
bahamat
I will say that triton-dehydrated expects there to be a working Triton :-)
-
bahamat
If that's not the case, there's no guarantee it will work :-)
-
barfield
is libumem the right place to look for querying vmm through syscalls btw? Just wondering for telegraf ram metrics
-
barfield
Oh there is a full triton/manta deployment in the environment
-
barfield
Now where I am hacking/cheating a bit is I want to get cmon working on a vanilla smartOS node
-
bahamat
But I mean if your sdc-oneachnode is broken, then there's nothing that triton-dehydrated can do about it.
-
barfield
sdc-oneachnode is working perfectly currently
-
bahamat
I don't think cmon on standalone smartos will work.
-
bahamat
It has heavy dependencies on sapi.
-
barfield
Damn even with manually written configs?
-
barfield
Or does it look for config-agent/registrar stuff?
-
bahamat
And if you're standing up sapi, you'll need moray, manatee, and binder
-
bahamat
It uses config-agent
-
barfield
Right so may as well just run triton haha
-
bahamat
You might be able to fudge enough to get cmon-agent running on standalone smartos
-
bahamat
but that's not the same as cmon itself.
-
bahamat
cmon also requires vmapi, cnapi, and ufds
-
barfield
Ah shit I didn't think about that
-
bahamat
So you're not far away from full triton at that point.
-
barfield
Is there another metric interface written for smartOS like CMON that could run standalone and be scraped by prometheus?
-
bahamat
Triton isn't really a bunch of reusable components.
-
bahamat
The reusable parts we publish as node modules
-
bahamat
but like any one Triton service, generally has strong dependencies on other Triton services.
-
barfield
So I guess glue the node modules together haha
-
barfield
Sounds like we're getting deep into node at that point.
-
barfield
I have SmartOS nodes sprinkled about the globe that I want to monitor but really dont want to keep replying on Zabbix
-
barfield
Plus I haven't built zabbix on current platform in ages
-
barfield
Guess my telegraf plugins will have to do if there isn't another native interface like cmon
-
bahamat
I mean, cmon-agent fundamentally is just a prometheus exporter that happens to be zone-aware.
-
barfield
So hack away at cmon-agent and configure it connect to a prom?
-
barfield
bypassing cmon proxy altogether?
-
barfield
Does it rely in anyway on promtail libraries maybe ported to node?
-
bahamat
cmon handles account based authentication, once the request is authenticated, it's just a pure proxy to cmon-agent
-
barfield
Forgot about the UFDS aspect
-
barfield
but cmon-agent is just an open ended api right?
-
bahamat
It's an unauthenticated exposition endpoint.
-
barfield
I feel a bit more clear on this
-
bahamat
I hesitate to even call it an API, because all you can do is GET
-
barfield
true, but would one need a prometheus zone locally to query cmon-agent directly? I guess cmon doesn't do metric shipping since prom pulls the metrics
-
barfield
This getting hackier by the moment :)
-
barfield
Oh well, guess I'll go back to ansible hell for the time being hehe. Maybe I'll get time to mess with this another day
-
barfield
Did you see my previous question about libumem? Curious if that is the correct system library name for querying ram
-
bahamat
I missed your question about libumem, but it's not for querying ram.
-
bahamat
It's a debugger for memory allocation.
-
barfield
I know that you can use kstat for that but like which system header would you call on illumos for ram?
-
bahamat
You LD_PRELOAD it into your app, and it tracks memory allocation, then when you get a core of the process you can use mdb to better account for memory usage in the dore dump
-
bahamat
s/dore/core/
-
jbk
libumem is a bit more than that
-
barfield
ah that makes much more sense
-
barfield
I was doing some reading on it last night, saw that it has been ported to windows and linux, but didn't get super deep
-
jbk
it's a malloc/free replacement that implements similar memory management as the kernel does (slab allocation, magazines) for higher performance allocation
-
jbk
the debugging aspects are additional features
-
barfield
But you wouldn't be able to import a libumem header to query memory usage or statitics from a monitoring plugin perspective right?
-
barfield
maybe a dtrace script would be better for that
-
jbk
yeah, if you're wanting to know about system memory usage, kstats is basically your main option
-
barfield
I was trying to build something with rust not long ago and I remember it lacked malloc calls or something I do not remember the exact detail but while I was trying to hack something together to make it build and get memory but couldn't determine the correct system libraries for that
-
barfield
On illumos that is
-
barfield
Was made for linux like everything else
-
jbk
i thought rust on illumos is already using libumem for it's allocations.. but maybe i'm misremembering
-
jbk
it's been a while since I worked on the illumos target
-
barfield
It probably is now, I know that perkin did a lot for the rust bootstrap on pkgsrc
-
barfield
I was only wondering for future issues that I may hit on project or another. Whether its go or rust or whatever, just wanted to try to figure out how to translate memory syscalls from linux to illumos if needed. Figured if I could just find the right library it wouldn't be much effort. But hell finding the correct library is an effort in and of itself lol
-
jperkin
yeh I've always built everything in pkgsrc with libumem, though I believe rust ensures it's always linked against it by default for the illumos target too