Time
S
Nick
Message
00:10
donsizemore joined #dataverse
03:22
jri joined #dataverse
07:00
jri joined #dataverse
07:01
jri joined #dataverse
07:02
jri joined #dataverse
07:13
jri joined #dataverse
09:06
jri joined #dataverse
11:01
donsizemore joined #dataverse
11:31
jri joined #dataverse
11:53
jri joined #dataverse
13:40
donsizemore joined #dataverse
13:48
cthao joined #dataverse
13:57
cthao joined #dataverse
13:59
cthao
For anyone who have experience in perl, how do I check if a process is runnning inside a Kubernetes pod/ Docker container. I wrote this but it work.
13:59
cthao
if ( system('cat /proc/self/cgroup | grep "kubepods"') ){
13:59
cthao
it returns true every time
14:06
pdurbin
cthao: in https://github.com/IQSS/dataverse/commit/ae115fd the approach (in Bash rather than Perl) was to look for the presence of a pod name.
14:10
cthao
is this code merged?
14:14
pdurbin
yep
14:15
pdurbin
cthao: do you see how it says "v4.9" at the top? That's how you can tell which release(s) the commit is in.
14:17
pdurbin
This commit, for example, is in every released version: https://github.com/IQSS/dataverse/commit/87f9b35 . If you click the "..." between v4.9 and 4.0 you can see them.
14:24
pdurbin
cthao: I was out yesterday but did you talk to Gustavo or Leonid? My understanding is that rather than calling the Perl script, we were thinking that you'd call directly the "glassfish-setup.sh" script it calls. I'm not sure if this was communicated to you or not.
14:27
pameyer joined #dataverse
14:29
cthao
that was one of the approaches I was thinking about, but no I was not aware of that
14:31
pameyer
@cthao - I suspect `if ( system('cat /proc/self/cgroup | grep "kubepods"') )` may be returning true because the command is executing without error (aka - exit status 0), rather than because it's got a result. but my perl knowledge is fairly minimal
14:32
pdurbin
Sorry that information didn't get to you. The idea is that Glassfish must be running for "glassfish-setup.sh" to make the changes it needs to make (using a series of asadmin commands), but the war file does not need to be deployed. So hopefully we can do this during `docker build`.
14:34
pameyer
@pdurbin - if you get the chance, could you double-check my interpretation in https://github.com/IQSS/dataverse/issues/3083#issuecomment-400396445
14:34
donsizemore joined #dataverse
14:37
cthao
@pdurbin good news tho. I already moved everything I need to move so dockerbuild (in the dockerfile)
14:38
pdurbin
cthao: great! Are you close to a pull request?
14:38
cthao
so right now I am trying to make the glassfish-setup run minimal code
14:38
ntorres joined #dataverse
14:38
cthao
I need to make changes to glassfish-setup first because right now all I'm doing is commenting out the lines I moved over
14:40
ntorres
hello
14:40
ntorres
I am installing a new dataverse, is this the best place to ask tech support questions?
14:41
donsizemore
@ntorres welcome =) and this is a great place to start
14:41
pdurbin
ntorres: ask away!
14:41
ntorres
I need to change the database password, how can I tell dataverse about the change ?
14:42
pdurbin
pameyer: I just left a comment on that issue you linked to
14:42
pdurbin
ntorres: do you mean the password used by the "dvapp" user?
14:42
ntorres
yes
14:43
pdurbin
I think by default, it's "secret" or something.
14:43
pameyer
pdurbin: thanks
14:43
donsizemore
@ntorres dataverse stores the DB client password in domain.xml, possibly/probably in /usr/local/glassfish4/glassfish/domains1/domain/config
14:44
pdurbin
ntorres: I had to say it, but as a developer, I always set postgres to "trust" so passwords aren't needed. donsizemore pameyer and others have more experience with production installations.
14:44
pdurbin
hate*
14:45
pdurbin
cthao: the plan is to call glassfish-setup, right? Not just move asadmin lines over.
14:46
ntorres
thanks, I think this informations help :)
14:47
pdurbin
ntorres: donsizemore is right. In /usr/local/glassfish4/glassfish/domains/domain1/config/domain.xml I'm seeing lines like <property name="User" value="dvnapp"></property> and <property name="password" value="secret"></property>
14:49
cthao
@pdurbin: some of the glassfish-setup commands could be handled in docker build, some cannot
14:49
cthao
the database ones generally cannot because the db isn't there yet
14:50
cthao
neither can the memory and smtp commands
15:07
cthao joined #dataverse
15:16
pdurbin
cthao: ok, so maybe you can use the same trick: if [ -z "$MY_POD_NAME" ]
15:19
cthao
just makign sure
15:20
cthao
if [ -z "$MY_POD_NAME" ] means that NOT a container right?
15:20
cthao49 joined #dataverse
15:20
cthao49
just making sure, if [ -z "$MY_POD_NAME" ] means NOT running in a container right?
15:40
pameyer joined #dataverse
15:52
jri joined #dataverse
16:04
pameyer joined #dataverse
16:08
pameyer
@cthao - `-z` checks for empty. so that conditional will be true if there's no $MY_POD_NAME environmental variable, or if that variable is an empty string
16:08
pameyer
that may or may not translate into running in a container, depending on the container environment
16:56
pameyer joined #dataverse
16:59
pameyer joined #dataverse
17:45
jri joined #dataverse
18:06
pameyer joined #dataverse
18:07
pameyer1 joined #dataverse
18:15
tmonson joined #dataverse
18:41
cthao joined #dataverse
19:48
pameyer joined #dataverse
20:04
pameyer joined #dataverse
20:50
pdurbin
What pameyer said. :)
21:08
pameyer joined #dataverse
22:35
dataverse-user joined #dataverse
23:44
juancorr84 joined #dataverse
23:46
juancorr84 left #dataverse