These are chat archives for atomix/atomix

2nd
Aug 2018
Johno Crawford
@johnou
Aug 02 2018 00:08 UTC
@kuujo so what's wrong with the shaded fat jar
if you want a distribution zip or something with license etc
you could just use the assembly plugin
Jordan Halterman
@kuujo
Aug 02 2018 00:38 UTC
That’s what I’m doing
Johno Crawford
@johnou
Aug 02 2018 00:39 UTC
:ok_hand:
Jordan Halterman
@kuujo
Aug 02 2018 00:40 UTC
The jar is fine for running but it’s not easy to setup and manage. Need a default logging configuration that a user can actually modify, a fixed location for the Raft logs, and some scripts. Just want a zip/tgz that you can unpack and run with a predictable folder structure.
Got it working and I like it
Just cleaning it up now
Junbo Ruan
@aruanruan
Aug 02 2018 00:43 UTC
What's happened to my own service? when upgrade to 3.0.0-rc6, my test case report 'No remote message handler reigisterd for this message', it is ok yesterday using 3.0.0-rc5, :(
Jordan Halterman
@kuujo
Aug 02 2018 00:43 UTC
Generates a zip and tar.gz file with:
/bin - just an atomix-agent script that sets up the classpath, system properties, garbage collector, and logging
/config - common configurations
/log - a logback.xml configuration and the path to which logs are written
/data - the default location for all Raft partitions and other persistent data
Pretty sure nothing changed in the clustering at all
Clustering/communication
maybe enable TRACE logging for NettyMessagingService to see what’s being received
Johno Crawford
@johnou
Aug 02 2018 00:46 UTC
Wouldn't it make more sense to put the logback configuration file in config and leave /logs for the actual logs
Jordan Halterman
@kuujo
Aug 02 2018 00:48 UTC
I want to separate them because the configurations in /conf aren’t even actually used. They’re basically just documentation
maybe /etc
@aruanruan reproducer?
Junbo Ruan
@aruanruan
Aug 02 2018 00:49 UTC
i am trying..
Jordan Halterman
@kuujo
Aug 02 2018 00:49 UTC
yeah NettyMessagingService hasn’t changed since June 12th
seems to be something weird going on with it though
Johno Crawford
@johnou
Aug 02 2018 00:53 UTC
Why do you say that
Junbo Ruan
@aruanruan
Aug 02 2018 00:57 UTC
2018-08-02 08:53:26,741 DEBUG (NettyMessagingService.java:1124)- localhost:5002 - No handler for message type system-partition-1-join from localhost:5001
Jordan Halterman
@kuujo
Aug 02 2018 00:58 UTC
that doesn’t mean anything by itself
unless it’s endless
Junbo Ruan
@aruanruan
Aug 02 2018 00:58 UTC
just failed to join the cluster
Jordan Halterman
@kuujo
Aug 02 2018 00:59 UTC
copy that log message too
that’s usually also normal because it will just retry
there’s always a race
node A tries to send a message to node B to join a Raft partition, but node B hasn’t registered its handler yet
node A tries to join a Raft partition, but no leader has been elected yet so it can't
when the cluster is initially forming, all the nodes will fail to join the cluster before they decide to start an election
@johnou we had a strange problem on our bare metal cluster today where one of the ONOS nodes couldn’t communicate with one of the Atomix nodes on the same machine
only happened on one of the machines
Jordan Halterman
@kuujo
Aug 02 2018 01:32 UTC
I guess that’s a decent enough first try at the distro
Just needed to have something that’s not a jar to give to our partners or they’d probably complain 🤷‍♂️
Johno Crawford
@johnou
Aug 02 2018 12:53 UTC
might be nice to flatten it a bit more
instead of the examples directory, just keep conf, and move the example files there eg. consensus.conf.example
Jordan Halterman
@kuujo
Aug 02 2018 12:54 UTC
Sure
Johno Crawford
@johnou
Aug 02 2018 12:55 UTC
and instead of having the license in two places
just include the one in the root
Jordan Halterman
@kuujo
Aug 02 2018 12:56 UTC
Is it in two place?
On in the repo
yeah in root, and in dist/src
Jordan Halterman
@kuujo
Aug 02 2018 12:57 UTC
Well according to Maven, accessing a file outside the scope of the module is a no no
Johno Crawford
@johnou
Aug 02 2018 12:57 UTC
i had a feeling
Jordan Halterman
@kuujo
Aug 02 2018 12:57 UTC
Which is why they got rid of project.parent
Johno Crawford
@johnou
Aug 02 2018 12:57 UTC
that's a bit naff
Jordan Halterman
@kuujo
Aug 02 2018 12:58 UTC
You have to use a relative path but I don’t care tbh
Johno Crawford
@johnou
Aug 02 2018 12:58 UTC
i was thinking ../LICENSE
but yeah
Jordan Halterman
@kuujo
Aug 02 2018 17:16 UTC
should be fixed
Johno Crawford
@johnou
Aug 02 2018 18:23 UTC
one more nit wrt glob matching
tomcat has a good cross platform init script
might be worth looking at
# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done

# Get standard environment variables
PRGDIR=`dirname "$PRG"`
Jordan Halterman
@kuujo
Aug 02 2018 18:27 UTC
which glob are you referring to?
Johno Crawford
@johnou
Aug 02 2018 18:28 UTC
making it future proof or easier to integrate into their system
i'm used to software with conf.d dirs and a bunch of configs, or maybe conf dir with samples
or maybe in their deployment script
java -jar atomix-agent.jar --config /home/atomix/conf/*.conf
oops
didn't link to my actual comment
ffs
I think naming it client.conf.example makes more sense so it's safe from being included with glob regex.
Jordan Halterman
@kuujo
Aug 02 2018 18:32 UTC
oh I see
mmm
Johno Crawford
@johnou
Aug 02 2018 18:32 UTC
same with rhel distros
when you use yum / dnf to update a package
you end up with file.conf.rpmnew
Jordan Halterman
@kuujo
Aug 02 2018 18:33 UTC
that seems like an argument for keeping them in a separate directory :-)
appending example to the end makes them interpreted differently by syntax highlighting applications
Johno Crawford
@johnou
Aug 02 2018 18:33 UTC
no :P
ah
i get you now
so you want the editors to render it correctly
Jordan Halterman
@kuujo
Aug 02 2018 18:34 UTC
indeed
Johno Crawford
@johnou
Aug 02 2018 18:34 UTC
well most editors would also let you just select the language but yeah might be nice to have it done automatically based on extension
Jordan Halterman
@kuujo
Aug 02 2018 18:35 UTC
yeah maybe I’ll switch it back
Johno Crawford
@johnou
Aug 02 2018 18:35 UTC
if you feel that's very important then yes switch it back
Jordan Halterman
@kuujo
Aug 02 2018 18:38 UTC
I’m going to add back the /examples folder. I’d rather keep /conf clean anyways
Johno Crawford
@johnou
Aug 02 2018 18:41 UTC
with all the changes to clustering bootstrap discovery still works with say, 3 fixed nodes, then another node that joins and participates in partitions right?
Jordan Halterman
@kuujo
Aug 02 2018 18:41 UTC
yeah
ahh you just reminded me of a bug I forgot about thanks
Johno Crawford
@johnou
Aug 02 2018 18:41 UTC
ok so technically should be possible to scale at runtime in aws then
the leave bug?
Jordan Halterman
@kuujo
Aug 02 2018 18:41 UTC
yeah
Johno Crawford
@johnou
Aug 02 2018 18:41 UTC
keeps trying to r/c
Jordan Halterman
@kuujo
Aug 02 2018 18:42 UTC
no I actually noticed the BootstrapDiscoveryProvider was sending heartbeats to itself
Johno Crawford
@johnou
Aug 02 2018 18:42 UTC
oh lovely
missing localmember filter then
Jordan Halterman
@kuujo
Aug 02 2018 18:42 UTC
nbd but pointless
Johno Crawford
@johnou
Aug 02 2018 18:42 UTC
well there's enough heartbeats as is
Jordan Halterman
@kuujo
Aug 02 2018 18:43 UTC
hmm it actually does filter… not sure why I was seeing that
should probably filter on ID instead of the Address
Johno Crawford
@johnou
Aug 02 2018 18:43 UTC
address includes port right
Jordan Halterman
@kuujo
Aug 02 2018 18:44 UTC
yeah
Johno Crawford
@johnou
Aug 02 2018 18:44 UTC
but yeah i would use id
Jordan Halterman
@kuujo
Aug 02 2018 19:09 UTC
Hmm actually that heartbeat may have been from another node on the same machine and a different port. I forgot I was doing that 🤷‍♂️
Jordan Halterman
@kuujo
Aug 02 2018 19:44 UTC
guess we’ll see how the distro works out in a real cluster🤞
Johno Crawford
@johnou
Aug 02 2018 20:54 UTC
Using nio or epoll? Remember there is a regression in the latter
Jordan Halterman
@kuujo
Aug 02 2018 21:17 UTC
epoll