Evergreen ILS Website

IRC log for #evergreen, 2020-01-28

| Channels | #evergreen index | Today | | Search | Google Search | Plain-Text | summary | Join Webchat

All times shown according to the server's local time.

Time Nick Message
00:04 alynn26 joined #evergreen
00:25 plux joined #evergreen
00:36 alynn26_away joined #evergreen
01:30 alynn26 joined #evergreen
06:42 Christineb joined #evergreen
06:59 agoben joined #evergreen
07:11 rjackson_isl joined #evergreen
07:12 collum joined #evergreen
08:03 alynn26 joined #evergreen
08:26 mantis1 joined #evergreen
08:38 mmorgan joined #evergreen
09:01 sandbergja joined #evergreen
09:09 Dyrcona joined #evergreen
09:16 jvwoolf joined #evergreen
09:23 cmalm joined #evergreen
09:24 Dyrcona joined #evergreen
09:38 jvwoolf joined #evergreen
09:58 Dyrcona Bleh... Struggling with rsync and sudo this morning. It's enough to make me just let the user run any command without a password on the remote.
10:00 Bmagic @band run any command without a password
10:01 Dyrcona And, nothing that I find on the Interwebs works....
10:01 Bmagic what the heck is the internet?
10:01 Dyrcona Maybe, I'll just let the user run rsync without a password.
10:02 Dyrcona Bmagic: I hear it's a series of tubes.
10:02 Bmagic I heard "pipes"
10:02 Bmagic Either way, it sucks
10:04 Dyrcona The Intertubes are actually OK. It's the crap we build on top of it. :P
10:04 Bmagic Are you saying that Cisco > Linux?
10:04 * Dyrcona is often amazed that any of this stuff ever works.
10:05 Bmagic Windows ME didn't work. So there's that.
10:05 Dyrcona Um, no. I'm saying hardware > software and tcp/ip > higher level protocols.
10:06 Dyrcona But, the hardware itself is mostly software, now, so its even more broken than usual....
10:06 * Dyrcona likes to read all of the CVEs for hardware and software and get depressed. It's enough to make me want to raise goats and live in a hut.
10:07 Dyrcona The last CVE ever filed will be: "The AI has decided that humans server no purpose..."
10:07 Dyrcona Maybe "server" wasn't a typo... :P
10:08 Dyrcona Anyway, back to messing rsync and sudo to put /etc/hosts in place without having to actually login as a user on the server.
10:11 Dyrcona Fun thing: When I try one of the options that "works" according to the stackoverfolow network, I get a protocol mismatch error and messages asking if the shell is clean... So, sudoers file, it is.
10:12 Bmagic You go with your bad self
10:13 Bmagic Show that file who's boss
10:13 nfBurton joined #evergreen
10:13 Dyrcona Well, it's risky cause now files can be copied anywhere on the server, but you have to have a key for access, and you have to ssh tunnel, and the tunnel host also requires a key....so, it comes down to whether or not I trust the other staff that have access to the machines.
10:14 Bmagic jail em. or make a Docker image that can be reset. or something else clever
10:14 nfBurton Anyone know how to fix the Ejabberd Could not open TCP socket to Jabber Server: Connection Refused error when trying to start osrf services
10:14 Dyrcona And, they can still put files anywhere. It's just a multi-step process.
10:15 Bmagic nfBurton: classic
10:15 nfBurton lol
10:15 Dyrcona Bmagic: A docker image for a VM host? That'll work well.
10:15 nfBurton I restarted my server and I cant start the services now
10:15 Dyrcona nfBurton: It was working before?
10:15 Bmagic Dyrcona: Docker contain inside* the VM. Do it all the time
10:15 nfBurton It got tempermental while on vacation
10:15 nfBurton Yup
10:16 Dyrcona Bmagic: I'm trying to update files on the hosts all at the same time, so Docker's not gonna solve my problem. :)
10:16 Dyrcona nfBurton: disk space ok?
10:16 Bmagic sudo rm -Rf /
10:16 jeff nfBurton: check if ejabberd is running, and if not, attempt to start? if it fails, it might be due to the hostname changing. the default debian/ubuntu config for ERLANG_NODE is sensitive to hostname changes.
10:17 nfBurton ejabberd starts but I cant connect
10:17 nfBurton My disc is at 100 though it seems
10:18 Bmagic nfBurton: 100% disk full? That'd do it
10:18 Bmagic handy command for completely removing ejabberd whilst retaining the config: updatedb && cp /etc/ejabberd/ejabberd.yml ~/ && apt-get -y --purge remove ejabberd && locate ejabberd|xargs rm -Rf
10:19 jeff if you have a full filesystem, i'd resolve that first. first suspect would be large logfiles in /var/log or /openils/var/log
10:19 Dyrcona So, I'll just do what I do on the VMs: Let this user run any command with NOPASSWD. What can possibly go wrong? :P
10:20 Dyrcona yeah, what jeff said. I was gonna say "DELETE ALL THE LOGS!!!"
10:20 Bmagic echo '' > /opensrf/var/log/osrfsys.log - one of my fav's
10:21 jeff Bmagic: I'm not sure I'd describe that command the way you did. It makes a copy of the config file, but otherwise purges the ejabberd config, user database, etc. Also, it will potentially be far more destructive than described.
10:21 Bmagic jeff: seems to be working so far :) - but you're right, use with caution
10:22 Dyrcona I use "truncate -s0 /openils/var/log/*.log" but not so much anymore, since I configure the use of syslog and that leads to autorotation of the logs.
10:23 Dyrcona Bmagic: BTW, ": > file" does the same thing.
10:23 Bmagic Dyrcona: Never seen that one. The "colon" command? sweet
10:23 Dyrcona I use that when "truncate -s0 .." is too much to type.
10:24 Dyrcona : evaluates to "true" in sh and derivatives, i.e. 0.
10:24 Bmagic cool
10:24 Dyrcona I forget exactly why, but I had to do something like " : && command...." in a script once.
10:25 Bmagic Neato. Reminds me of the old command for Windows that makes no sense: "cons/cons"
10:25 Bmagic you type that command into the run prompt on Windows 95/98: instant blue screen
10:26 Dyrcona I know I've used it to force an executable file to open a particular program to run the rest of the "script."
10:27 nfBurton Thanks for that, that helped.
10:27 nfBurton Bmagic++
10:27 Bmagic the obvious connection from "cons" is "consoto" which is MS's "generic" naming sort of like "Consortium" shortname="CONS"
10:29 Dyrcona Bmagic: Yeah, if the first line of a shell script begins with ":;exec command ..." Then the shell instance spawned to run it gets replaced with command.
10:30 Bmagic pretty cool
10:31 sandbergja joined #evergreen
10:31 Dyrcona It's usually not necessary, but I use it for ... Emacs batch scripts. So I can write scripts in Emacs Lisp and run them from the command line. :)
10:32 Dyrcona Anyway, back to fixing my permissions issues on the VM hosts.
10:32 Dyrcona nfBurton: Glad it was that simple.
10:32 Bmagic Good luck
10:33 Dyrcona Bmagic: This is easy, just take a sudoers file I have for the opensrf user and change the username, then copy it to the servers, and put it in place. :)
10:33 Bmagic Sounds like a job for..... Dyrcona!
10:34 Dyrcona Definitely not an emacs batch script. :)
10:36 Dyrcona Oh, one last thing about :;exec, it lets you bypass the shell's limit on number of arguments on the shebang line.
10:36 Bmagic Muy bien
10:37 Dyrcona That's the main reason that I use it for my Emacs batch scripts, which, honestly, I almost never create.
11:13 mllewellyn joined #evergreen
11:13 mllewellyn left #evergreen
11:14 Dyrcona Oh, Launchpad! First, you make me log in again, and then you tell me to try again later when adding a comment to a bug.
11:41 jvwoolf joined #evergreen
11:49 jihpringle joined #evergreen
12:14 alynn26 joined #evergreen
12:25 khuckins joined #evergreen
12:33 Dyrcona Heh. Having set bug 1850156 to confirmed, I realize that there's only 1 target I need to run because I usually install the other required packages anyway, so I could get by with out a *-git install target.
12:33 pinesol Launchpad bug 1850156 in Evergreen "Need a -tester make target" [Wishlist,Confirmed] https://launchpad.net/bugs/1850156
12:36 Dyrcona Think I'll give others some time to comment before I actually start a branch. Basically all I need is make -f Open-ILS/src/extras/install/Makefile.common install_node_js_from_source. So, I suppose an alternative would be to document that in the README for sites installing from a git checkout.
12:50 mmorgan I'm trying to add a call number to the autorenewnotify action trigger. I've added target_copy.call_number to the environment, but as soon as I do, I get this error:
12:50 mmorgan Can't call method "call_number" on an undefined value at /usr/local/share/perl/5.24.1/OpenI​LS/Application/Trigger/Reactor.pm line 129.
12:50 mmorgan What am I missing?
12:51 collum joined #evergreen
12:53 Dyrcona Oh, lovely.... Run install_nodejs_from_source by itself and it fails because the URL is set in a variable that isn't set in Makefile.common.
12:54 Dyrcona mmorgan: I thought call number was already available in the environment.
12:57 collum_ joined #evergreen
12:59 mmorgan Dyrcona: not seeing it, unless I removed it, but don't think so. Checking.
13:00 Dyrcona mmorgan: We have "target_copy.call_number.record.mattrs" in our environment for autorenewnotify with no issues. That should make all call_number fields available. You'd also have to add the prefix and suffix if you wanted the labels for those.
13:01 Dyrcona Based on the id number of the environment entry, I'd say we added that path, and it isn't stock.
13:01 * mmorgan will try it
13:02 Dyrcona Do you have to restart the trigger service after changing something like that?
13:03 Dyrcona I can never remember what requires restarts and what doesn't.
13:04 Dyrcona target_copy.call_number by itself, should work.
13:04 mmorgan Maybe the restart was what I was missing?
13:05 sandbergja joined #evergreen
13:08 mmorgan still doesn't work after restart :-(
13:10 * mmorgan will need to revisit after lunch.
13:30 collum joined #evergreen
14:01 jeff mmorgan: are you calling get_copy_bib_basics in your template and passing it an object that used to be a raw id, and now needs to be foo.id?
14:02 jeff mmorgan: looks like the stock template for autorenew does that:
14:02 jeff [%- SET cid = circ.target_copy || udata.copy -%]
14:02 jeff [%- SET copy_details = helpers.get_copy_bib_basics(cid) -%]
14:03 jeff if by adding target_copy.call_number to the environment you've caused circ.target_copy to be a fleshed object and not an ID, you'll want to change SET cid = circ.target_copy to SET cid = circ.target_copy.id and try again
14:06 Dyrcona jeff++
14:06 Dyrcona I think you've got it.
14:07 jeff not sure if the udata.copy bit would need any modification. looking at commit a9c3660f2b7 would probably be a starting point.
14:07 pinesol jeff: [evergreen|Cesar Velez] LP#1779920 - Autorenew Feature - <http://git.evergreen-ils.org/?p=​Evergreen.git;a=commit;h=a9c3660>
14:07 Stompro joined #evergreen
14:08 jeff or just reviewing the user_data bits of Open-ILS/src/perlmods/lib/OpenILS/Applic​ation/Trigger/Reactor/Circ/AutoRenew.pm
14:09 jeff looks like udata.copy will be fine, and will already be an id, not an object.
14:11 jeff I wonder though if there are any cases where circ.target_copy will not be an object, since the SET cid seems to accommodate the possibility that it will not be set.
14:11 jvwoolf1 joined #evergreen
14:13 jeff circ is the core object for the autorenewal hook, and target_copy on circ is NOT NULL, so...
14:13 Dyrcona Yeah. Not sure what's going on.
14:14 jeff ...I'm not sure when you'd ever have an AutorenewNotify where [%- SET cid = circ.target_copy || udata.copy -%] would fall through to using the value in udata.copy.
14:16 Dyrcona Our template is customized. I'd have to dump it to see if I handled that, but I must have because it is working for us.
14:17 jeff interesting: "all autorenewals occur from patron's Home OU"
14:17 jeff I would want them to behave like OPAC renewals.
14:22 jeff looks like even though that comment exists in OpenILS::Application::Trigge​r::Reactor::Circ::AutoRenew, the renewal might still respect the value of circ.opac_renewal.use_original_circ_lib
14:25 Dyrcona Yeah, we've not had any complaints on that front.
14:37 jeff doesn't look like any stock templates have an example of handling unfleshed-or-fleshed, but that might be a useful addition to the helper, or several helpers.
14:44 Dyrcona mmorgan | jeff: From our template: copy_details = helpers.get_copy_bib_basics(circ.target_copy.id)
14:45 Dyrcona So, yeah, I ajusted it for target_copy being fleshed.
14:46 Dyrcona However, I *think* the helpers work with an object or an id? I'll have to check the code to be certain.
14:46 rfrasur joined #evergreen
14:48 Dyrcona Ah, whaddya know... That was the wrong template, 'cause I was looking at an update script with multiple templates in it. :)
14:48 jeff heh.
14:49 jeff current master get_copy_bib_basics helper does not seem to handle being fed an object.
14:49 Dyrcona Huh. Wonder why we're fleshing all the way to record.mattrs. We're not using any of the mattrs.
14:52 * mmorgan has a meeting to go to now, will try those suggestions a bit later and report back.
14:52 mmorgan Dyrcona++
14:52 mmorgan jeff++
14:53 jeff amusingly, get_copy_price helper variables imply that you should pass it an id, but it'll fail unless you hand it an object. :P
14:53 jeff (every stock template that uses get_copy_price hands it an object)
14:54 Dyrcona This is from our actual template in the database: [% SET cid = circ.target_copy.id || udata.copy %]
14:54 Dyrcona The one in that update script was wrong. :)
14:54 jeff yeah, looks like you modified from stock when you changed the environment.
14:54 Dyrcona Even when I scrolled down the autorenewnotify update.
14:55 Dyrcona Yeah, definitely.
14:55 Dyrcona I was sure we had.
14:55 Dyrcona And we are using the attrs in the template in the database.
14:56 Dyrcona We're using icon_format to fill in the atrr.value as a "format" field.
14:57 Dyrcona I could pastebin the template if anyone is really interested.
14:57 * mmorgan raises hand
14:57 Dyrcona :)
14:57 mmorgan We've thought of adding format, too.
15:01 mmorgan1 joined #evergreen
15:02 Dyrcona mmorgan1: https://pastebin.com/yuQmqXkn
15:03 khuckins joined #evergreen
15:11 jvwoolf joined #evergreen
15:25 mmorgan joined #evergreen
15:29 mmorgan Dyrcona++
15:37 mantis1 left #evergreen
16:23 mmorgan jeff++
16:23 mmorgan Making the change to SET cid did the trick
16:23 mmorgan [%- SET cid = circ.target_copy.id || udata.copy -%]
16:29 Dyrcona mmorgan: We also added circ.target_copy.parts.part to the environment.
16:31 mmorgan Yes, did that, too. Whenever we use a call number, we always include its friends, Prefix, Suffix, and Part :)
16:37 Dyrcona Ah, ok, cool.
17:05 mmorgan left #evergreen
18:16 jihpringle joined #evergreen
19:10 cmalm joined #evergreen
21:37 sandbergja joined #evergreen

| Channels | #evergreen index | Today | | Search | Google Search | Plain-Text | summary | Join Webchat