/srv/irclogs.ubuntu.com/2022/05/23/#ubuntu-server.txt

rfmblahdeblah, easier to download a cloud-image and not bother running the installer at all00:12
rfmblahdeblah, lxd or multipass are both very quick ways of spinning up a ubuntu vm from an image library, if you can live with their quirks (mainly, they install by snap)  Last time i tried multipass it didn't allow bridged network, but that may have changed by now, I know it was in progress00:16
blahdeblahI haven't looked at multipass for a long time, but I'm struggling to understand how lxd would help anything here.  If I were going to download an image anyway, I would just download the ISO and boot from that in virt-manager (if I can find one that works - for some reason the last few I downloaded didn't, even though the checksum was fine).00:28
rbasakblahdeblah: running the installer in a VM is a backwards way of doing things unless you're testing the installer itself. Why download a thing that'll eventually generate the VM image you want when you can just download the VM image that we ship? It's sort of the equivalent of compiling from source instead of downloading a binary distribution.00:34
rbasakThe only catch is that you need to tell the VM how to specialise itself for your purposes. Just like you have to tell the installer what you want.00:36
rbasakThat's done with cloud-init, and tools like multipass and lxd know how to operate that out-of-the-box.00:36
blahdeblahrbasak: As in, multipass or lxd can provide the infrastructure and run the server side of cloud-init for me?01:28
blahdeblahI'd be very happy to do the specialisation with cloud-init.  I'm just not sure about how to plug the pieces together on a standalone VM host, and wondering about the overhead in time/setup for a low-churn host which might get a VM installed once a month or whatever.01:30
rbasakblahdeblah: absolutely - doing that is the point. For examle: "lxc launch --vm ubuntu:jammy yourvm" then "lxc shell yourvm". Drop the --vm for a (full system) container instead.01:35
utkarsh2102rbasak: isn't it very late for you there? :)01:37
rbasakIt is :)01:37
voltagexrbasak: what if I *do* want to do the equivalent of building from source01:37
rbasakblahdeblah: for specialisation see https://cloudinit.readthedocs.io/en/latest/topics/examples.html for some examples01:37
rbasakvoltagex: then you can, sure. It's not the usual use case though.01:38
voltagexI'm trying to track down how the ubuntu-server-live ISO is generated - it'd probably also be useful to know how the cloud images are generated.01:38
rbasakblahdeblah: "lxc profile create myprofile", "lxc profile edit myprofile", "lxc launch -p myprofile ..."01:38
rbasakblahdeblah: in the profile you put the #cloud-config thing under config.user.user-data01:39
blahdeblahrbasak: Perhaps I'm not explaining my problem clearly enough; those examples are for cloud-init config on the guest VM. 01:43
blahdeblahWhat I am asking is what the process is for setting up the server components.  Obviously it needs a web server that can serve ISOs or something, along with the cloud-init configs.01:44
rbasakThere aren't any server components. There can be, if you want. But cloud-init will take it's configuration from a variety of sources, and one of those is to just look for a connected disk for example.01:45
rbasakFor example, you can create a "nocloud" disk with the cloud-localds tool01:46
rbasakThen attach that disk as an additional disk to your VM01:46
blahdeblahInteresting; might be a good option01:47
rbasakWhen the VM boots a pristine Ubuntu cloud image (as a disk), it'll also find the additional disk with the cloud-init configuration on it, and use that.01:47
rbasakI'm not sure if lxd uses that mechanism or a different one. But it doesn't matter - lxd sets up the magic for you.01:47
rbasak(and the same with multipass)01:47
rbasakSo all you do is give lxd the cloud-init configuration you want, and it does the rest.01:48
blahdeblahCloud image as in https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img ?01:49
rbasakI think that's right yes01:49
blahdeblahThanks rbasak; I'll go do some reading about the lxd magic.01:49
rbasakTry https://cloudinit.readthedocs.io/en/latest/topics/datasources.html and https://cloudinit.readthedocs.io/en/latest/topics/datasources/lxd.html01:49
rbasakLooks like cloud-init has specific support for lxd01:49
=== stoned is now known as Hash
cpaelzergood morning05:08
=== BOWnbERTHA1 is now known as BOWnbERTHA
blahdeblahAfternoon, cpaelzer \o05:29
cpaelzerhi blahdeblah05:43
cpaelzerblahdeblah: did you get happy with your experiments for cloud-images + cloud-init to customize your guests?05:45
blahdeblahDidn't get to it yet; other pressing work stuff happening. :-)05:54
=== zerosum is now known as Guest5460
ahasenackmorning12:11
MJCDholla12:39
=== MJCD is now known as MJCd
=== MJCd is now known as MJCD
MJCDI am having an issue with snapd while trying to do a new certbot install12:40
MJCDi've previously used it via <other> methods12:40
MJCDwhen I do `sudo certbot --apache` after it installs and lists as enabled in snapd12:42
MJCDit says `permanently dropping privs did not work: File exists`12:43
MJCDI can't find any real info about it12:43
MJCDactually running certbot at all generates that so maybe not related to snapd12:44
MJCDhumm12:44
MJCDhttps://bugs.launchpad.net/ubuntu/+source/snapd/+bug/176041613:01
ubottuLaunchpad bug 1760416 in snapd (Ubuntu) "dropping privs did not work: Invalid argument" [Undecided, Invalid]13:01
MJCDclosest thing i've found13:01
MJCDbut I doubt it's a certbot bug even -- I would have been using the same exact version previously just without snapd13:02
MJCDhowever conflicting a bit moreeee13:02
MJCDI also can't run it in standalone mode13:02
MJCDsame error13:02
rbasakMJCD: are you running as an ordinary user?13:17
MJCD`sudo certbot`13:17
MJCDbut i'm logged in as regular user, yeah13:18
MJCDI did try as root13:18
MJCDsame thing13:18
MJCDlike tried as root directly I mean13:18
rbasakHave you tried running it as an ordrinary user?13:18
MJCDyeah same thing and infact even running it standalone mode which should always work, gives the same exact error13:18
MJCDwhich leads me to think it's something about snapd13:18
rbasakLike just "certbot --help"or something without sudo.13:19
MJCDi'm not using it for literally anything else13:19
MJCDill try --help one sec13:19
MJCDhummm I reinstalled the snap and it's a bit different now13:19
MJCDso as regular user --help gives me proper output which is good13:20
MJCDrunning `certbot --apache` gives a permission error, which is good13:20
MJCDbut then adding `sudo` doesn't help that lol13:20
MJCDhmm13:20
MJCDprogress somehow though -- not sure what I did xD13:20
rbasakIn the bug you referenced there was a problem with the configuration in /etc/passwd/group13:21
MJCDuhmmm13:21
MJCDok so13:21
MJCDit was because apache was still running13:21
MJCDbut13:21
rbasakWhat does "getent passwd $USER" say?13:21
MJCDif I `sudo service apache2 stop`13:21
MJCDthen it goes back to permanent dropping privs did not work` again13:21
MJCDone sec13:21
MJCDmjcd:x:1000:1000:MJCD:/home/mjcd:/bin/bash13:22
MJCDx? lol13:22
MJCDit //was// 1000:113:23
MJCDbut as per that link before I updated that to my own group13:23
MJCDwhich is showing fine after a reboot in `id`13:23
MJCDuid=1000(mjcd) gid=1000(mjcd) groups=1000(mjcd),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd)13:23
rbasakit //was// 1000:1> how did that happen? Given the bug you linked, it seems likely that you have something misconfigured related to that causing your problem.13:24
MJCDi'm really confused now though because the guides on both sides (letsencrypt/certbot and my provider) say to stop apache13:24
rbasakDoes "sudo true" work?13:24
MJCDand idk it was always 1 (root) because it's the only/original user13:24
rbasakSeems to me that your problem is more fundamental than anything to do with snap or certbot.13:24
MJCDsudo works completely13:25
MJCDdid the full lamp stack setup as this user13:25
rbasakUbuntu does not by default create a user with gid 1.13:25
rbasakHow did it end up like that?13:25
MJCDhow would I know; but it's fixed now as per the output above13:25
MJCDI don't think I did it/can't see how I would have13:25
rbasakWhatever caused that might have misconfigured something else related too.13:25
MJCDit may be from an upgrade install13:25
rbasakI think it's unlikely to have been caused by an upgrade.13:26
MJCDwhat else could have been "broken" by such a change?13:26
MJCDit seems totally innocuous either way13:26
MJCDsince it's meant to be run as sudo13:26
MJCDit doesn't have to be but the certonly option gives me the same error13:27
MJCDwhich baffles me further13:27
MJCDalso as above note this error occurs when apache2 is stopped13:27
MJCDwhen it's running (disobeying the guides) I get a sensical, coloured highlighted error about permission denied13:28
MJCDwhich seems fine13:28
samy1028MJCD: is there anything in any of of your other /var/log/*?  like in auth.log or other things that might be reporting at the same time?13:28
MJCDlet me take a look13:28
rbasakMJCD: do you now have a bunch of files on the system that are owned by the wrong group ID for example?13:30
MJCDrbasak: how would I easily check that13:30
MJCDagain tho i'm working entirely as root13:30
MJCDand other services run as www-data13:30
MJCDso my user should be pretty irrelevant13:30
MJCDI can sudo su and do it from there13:31
MJCDsame result13:31
MJCDjust fwiw I am noting in my dmesg some ufw blocks13:31
rbasakMJCD: I don't think you can easily check the entire set of consequences that might have arisen from your previous misconfiguration.13:32
MJCDlol kind of a strawman argument thoe....13:32
MJCDdoubly so as given the conditions above13:32
MJCDI can make an entirely new user if it makes you feel at ease13:32
MJCDit will still all be done/run as root13:33
MJCD(via sudo)13:33
MJCDand I did amend my own gid :))13:33
rbasakI would redo whatever you're trying to achieve from the beginning using a fresh VM or container - see devops principles.13:33
MJCDlol, i've done nothing but install lamp13:33
MJCDfrom apt13:33
MJCDtotally default install13:34
rbasakThen you did you end up with a user with a gid of 1?13:34
rbasakAnyway, it should be easy to redo then?13:34
MJCDNot really it's not an instance I manage13:34
MJCDand it's kind of an involved env13:34
rbasakIt's now a broken env.13:35
MJCDie it's a few hours work, after waiting <unknown> period13:35
MJCDlol...13:35
MJCDyou're stuck in a loop now13:35
MJCDagain.13:35
MJCDit's ALL done as root.13:35
MJCDMy current user is intangible to the issue13:35
samy1028MJCD : are you able to duplicate the environment in a new VM?13:35
MJCDsamy1028: nah previously I just wasn't using snapd13:35
MJCDand now that's <the way>13:35
MJCDso am trying to implement it13:35
samy1028fyi - root can still get "broken".13:35
MJCDofcourse it can13:35
MJCDbut it's not going to give me an error that it can't de-escalate perms because "file exists"13:36
rbasakIt's normal for various tools and services to "drop privs".13:36
MJCDagain I can make a whole new local user if that helps put minds at ease13:36
MJCDrbasak: ofcourse13:36
MJCDthus how everything runs as www-data13:36
rbasakSo your not-root needs to not be broken too.13:36
MJCDOkay new user it is13:37
MJCDokay new user13:39
MJCD`snap list` 13:39
MJCDcore, lxd, snapd13:40
MJCD`sudo snap install certbot --classic`13:40
MJCD... installed13:41
MJCD`certbot --help` => shows help info13:41
MJCD`sudo certbot --help` => "permanently dropping privs did not work: File exists"13:42
MJCDjust to add as well incase it's relevant -- from dmesg13:42
MJCD`[ 1728.563701] [UFW BLOCK] IN=ens160 OUT= MAC=00:50:56:02:ea:72:00:a2:ee:75:a6:c1:08:00 SRC=80.82.64.114 DST=139.99.191.6 LEN=40 TOS=0x00 PREC=0x00 TTL=239 ID=36790 PROTO=TCP SPT=59360 DPT=2559 WINDOW=1024 RES=0x00 SYN URGP=0`13:42
MJCDand the line before that...13:44
MJCD`[ 1681.890238] audit: type=1400 audit(1653313260.929:46): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="snap-update-ns.certbot" pid=3529 comm="apparmor_parser"`13:44
MJCDI worry that it's something stupid like maybe the apache2 pid file not getting cleaned up or something13:47
MJCDbecause what file is it even talking about lol13:47
MJCDdisabling the firewall entirely still gives the same behavior so I assume those messages are reasonably unrelated especially since it's asking for access and then saying those perms are same as current13:48
MJCDsnapd is meant to make my life good forever instead it's giving me heck13:49
MJCDfwiw as well I followed all the steps to make sure there was nothing of certbot already installed as per the guide13:49
MJCDthough there shouldn't have been and it didn't find/do anything13:50
MJCDI mean at a bare minimum13:53
MJCD`sudo snap run certbot certonly --standalone`13:53
MJCDthat should not give any error about some file already existing13:53
MJCDokay so I made it make a log file13:55
MJCDand it's trying and failing to get /etc/letsencrypt/stuff13:56
MJCDwhich doesn't exist contrary to the error13:56
MJCDlol13:56
MJCDI think I might give it a go using pip >.>13:59
MJCDthe linode guide is actually funnily more detailed than the official certbot docs14:00
patdk-lapIve never been a fan of certbot, and use dehydrated instead14:04
MJCDehh yeah I know there's options just getting the vanilla standards down pat/up to date for now14:06
MJCDso uhm14:06
MJCDthe official guide lied to me and I should have checked for ubuntu specific docs14:07
MJCDbecause while it's probably ideal to have it under snap14:07
MJCDit appears they still just want me to do `apt install certbot` ahaha14:07
MJCDnow i'm getting the much more benign `The requested apache plugin does not appear to be installed`14:08
MJCDand there we go! added sudo apt-get install python3-certbot-apache 14:09
MJCDand it's all working14:09
MJCDfunny how in their attempts to make it easier (ubuntu's I mean) they actually made the official docs from the software authors not work properly14:10
MJCDas a sidenote I literally worry about what will happen when people on the same level as linus are all dead and gone14:12
MJCDbecause it's just going to get infinitely more fragmented; and who is to be entrusted with such a role who doesn't have a commercial interest14:13
MJCDie Microsoft could do it with a $bigCost but nobody wants <unix> under their stewardship14:13
patdk-lapmicrosoft already does it14:14
MJCDnot really the same tho they're contributors14:14
patdk-lapredhat has been doing it forever14:14
MJCDand redhat etc etc all still rely on the kernel14:14
MJCDbsd ofc has their own14:14
patdk-lapheh?14:14
patdk-lapmaybe your confusing upstream pushes with inhouse versions14:15
MJCDthe opposite14:15
patdk-lapsure they all contribute, but they also have their own14:15
MJCDthe base14:15
MJCDfrom which all streams flow14:15
patdk-lapno14:15
MJCDye14:15
patdk-lapthat isn't how git works14:15
patdk-lapthat is how cvs/svn works14:15
MJCDgit is a source control tool not a kernel ;p14:15
MJCDand ofcourse it is.14:16
patdk-lapyes, but it doesn't all flow down14:16
MJCDnot all, no.14:16
MJCDand then deeply customized14:16
MJCDbut that's my point14:16
patdk-lapit's also why redhat NEVER updated their kernel14:16
MJCDafter linus and similar people who literally give their life to provide that bases ongoing dev14:17
MJCDit's everyone for themselves14:17
patdk-lapubuntu has the hwe thing to update but generally doesn't14:17
MJCDwhich will lead to hyper fragmentation14:17
MJCDwhich is universally bad for everyone14:17
patdk-lapthere are plunty of people in positions to do it14:17
MJCDso you really NEED //SOMEONE// to take that stewardship14:17
patdk-lapthe issue is the power struggle of how many people will try to do it14:18
patdk-lapand who will trust who14:18
MJCDthere are, but mostly in the longer terms ie generations on generations as the OS is intended for14:18
MJCDlike there's not people queueing up to do it that everyone can universally agree on14:18
patdk-lapI really don't think linux was entended to even last one generation14:18
MJCDthey'd need a certain authority.14:18
MJCDwhich almost directly implies commercial scale14:19
MJCDand sure redhat can splinter off from the last version there is or that they choose to etc etc14:19
MJCDbut again, that's fragmentation14:19
MJCDand can and will be a  nightmarish scenario14:19
patdk-lapit's already fragmentated14:19
MJCDit wont be do you know <one of three> OS? If so you're good to go it's pretty same/same!14:20
patdk-lapanything worth doing is highly fragmented, or else you can never test anything, and everyone is producing the same thing14:20
MJCDI mean who knows maybe it'll end great14:20
MJCDI mean... A lot of the concepts in 2022 are so refined for UX that that's gonna happen regardless14:20
patdk-lapand I thought we where talking kernel, or are we talking os?14:20
patdk-lapthere are hundreds of linux os's14:21
MJCDWe have pretty good proof of what's good/works and why14:21
MJCDyes, and they're pretty similar ;p14:21
MJCDimagine for example xorg14:21
MJCDare they then expected to conform to say, debian/ubuntu compatibility as well as redhat compatibility?14:21
MJCDand then on and on and on the list goes?14:21
MJCDas is the ecosystem is 99% about reusability14:22
MJCDcompartmentalization and components14:22
MJCDmodules14:22
MJCDlibs14:22
patdk-lapsinse when did xorg ever do that?14:22
MJCDthey don't, now14:22
patdk-lapor ever did14:22
MJCDbut if they became too far apart in how they operated....14:22
patdk-lapredhat patches it to make it compatable14:22
MJCDit'd be invariable14:22
patdk-lapand ubuntu patches it to make it compatable14:22
patdk-lapand if upstream accepts14:22
MJCDlol I mean, yes and no14:22
MJCDthey tweak it14:22
MJCDit's already natively compatible14:23
MJCDeverything is largely the same14:23
MJCDjust organized differently heh14:23
patdk-lapso your telling me xorg has to create upstart compatability and systemd compatability, and anything else14:23
MJCDbut the kernel is what allows for that to happen14:23
MJCDand more importantly14:23
patdk-lapthose never started upstream14:23
MJCDto continue to move forward14:23
patdk-lapno, libc14:23
patdk-lapthe kernel doesn't matter there at all14:23
MJCDlol 14:23
patdk-lapit's all libc and the os14:23
MJCD> and the OS14:24
MJCDie the kernel14:24
MJCDsigh14:24
patdk-lapthe issue with linux is libc wasn't wrapped into the kernel interface14:24
patdk-lapwhy we have all the abi changes14:24
patdk-lapunlike freebsd14:24
MJCDanyways thanks for rubber duckying my stupid certbot issue14:24
MJCDalways remember friends; obey the apt14:24
patdk-lapcertbot issues, I gave up on it so long ago and dropped certbot cause of them14:24
MJCDit's working perfect now, not in a snap14:24
patdk-lap:)14:25
MJCDso I can disable snaps entirely14:25
patdk-lapya, I went to some snaps on my desktop machine14:25
MJCDthough might look into it as it seems to be some kind of like, docker alike thing?14:25
MJCDbut native?14:25
patdk-lapbut it's proving to be repeated crashing so going have to drop them14:25
MJCDorly?14:25
patdk-lapya, moved to slack snap, and it's causing all kinds of pains, and chrome having issues14:26
patdk-lapmysql workbench snap just wouldn't work, permission issues with local users config files14:26
patdk-lapdiscord snap is like only one that hasn't given me any issues14:27
patdk-lappersonally I would imagine it would look something like illumos-gate does currently14:35
patdk-lapseveral companies approve and signoff of each others pr's14:35
yurtesenahasenack: do you know when you will have a possible solution for tomcat log rotation bug?16:07
ahasenackother bugs are ahead of that one at the moment16:56
ahasenackkanashiro: have you ever seen a lxd fence agent for corosync/pacemaker?18:06
ahasenacklike there are ssh ones, or even libvirt18:06
ahasenackshould be similar to libvirt in concept at least18:06
kanashiroahasenack, I think there is one, let me check18:08
ahasenackI searched and only found a very old blog post about using lxc (not lxd) as a libvirt backend, and then using the libvirt fence agent18:08
ahasenackah, I was in focal, maybe jammy+ has something18:09
kanashiroahasenack, hum, I did not found a fence agent, there is one lxd resource agent18:10
ahasenackah18:10
giu-hi to all20:47
=== mgedmin_ is now known as mgedmin
=== Guest5460 is now known as zerosum

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!