Friday, 2016-09-23

*** thinrichs has joined #congress01:00
*** thinrichs has quit IRC01:11
openstackgerritEric K proposed openstack/congress: Remove the traceback added by oslo-messaging RPC  https://review.openstack.org/37518301:13
openstackgerritEric K proposed openstack/congress: Make policy rule requests gives 404 (not 400) when policy not found  https://review.openstack.org/37520202:42
*** ramineni_ has joined #congress02:59
openstackgerritMerged openstack/congress: Updated from global requirements  https://review.openstack.org/37468403:36
openstackgerritAnusha Ramineni proposed openstack/congress: Mark distributed_architecture config as DEPRECATED  https://review.openstack.org/37362703:45
*** ramineni_ has quit IRC03:52
openstackgerritAnusha Ramineni proposed openstack/congress: Some updations in congress docs  https://review.openstack.org/37364504:01
openstackgerritAnusha Ramineni proposed openstack/congress: Some updations in congress docs  https://review.openstack.org/37364504:03
openstackgerritAnusha Ramineni proposed openstack/congress: Default to single process in devstack  https://review.openstack.org/37314004:19
*** absubram has quit IRC05:47
*** ramineni_ has joined #congress06:19
*** rrecio_ has quit IRC06:45
*** absubram has joined #congress08:30
*** absubram_ has joined #congress08:32
*** absubram has quit IRC08:34
*** absubram_ is now known as absubram08:34
*** absubram has quit IRC08:34
*** openstackgerrit has quit IRC09:03
*** openstackgerrit has joined #congress09:04
*** ramineni_ has quit IRC09:08
openstackgerritAnusha Ramineni proposed openstack/congress: Remove outdated changes in docs  https://review.openstack.org/37537910:20
openstackgerritMerged openstack/congress: Make policy rule requests gives 404 (not 400) when policy not found  https://review.openstack.org/37520210:37
openstackgerritAnusha Ramineni proposed openstack/congress: Default to single process in devstack  https://review.openstack.org/37314010:38
*** ramineni_ has joined #congress11:02
*** ramineni_ has quit IRC11:32
*** catintheroof has quit IRC12:08
*** rrecio has joined #congress14:48
*** rrecio_ has joined #congress14:50
*** thinrichs has joined #congress14:52
*** rrecio has quit IRC14:53
*** absubram has joined #congress15:48
*** thinrichs has quit IRC16:55
*** catintheroof has joined #congress17:09
*** thinrichs has joined #congress18:08
*** thinrichs has quit IRC18:51
openstackgerritEric K proposed openstack/congress: Remove the traceback added by oslo-messaging RPC  https://review.openstack.org/37518319:13
*** catintheroof has quit IRC19:17
*** absubram has quit IRC19:41
*** absubram has joined #congress19:56
*** absubram_ has joined #congress19:57
*** absubram has quit IRC20:01
*** absubram_ is now known as absubram20:01
*** absubram has quit IRC20:10
*** thinrichs has joined #congress20:14
openstackgerritTim Hinrichs proposed openstack/congress: WIP - local HA tests  https://review.openstack.org/35892720:47
thinrichsekcs: Made progress on the tests.  But running into something weird.20:49
thinrichsekcs: Trying to figure out if it's an artifact of the test or a real problem20:49
ekcshey thinrichs20:49
openstackgerritEric K proposed openstack/congress: Sketch: Avoid orphan rule on concurrent rule insert & policy del  https://review.openstack.org/37571920:50
thinrichsFor most of the policy-rule APIs I've tried, I need to run them twice to get the desired behavior.  The first one gives a 400/500, and the second works.20:50
thinrichsI pushed test up to gerrit20:50
thinrichshttps://review.openstack.org/#/c/358927/14/congress/tests/haht/test_congress_haht.py20:50
thinrichsand commented on an example.20:50
thinrichsekcs: have you seen this before?  Again, happy to talk on the phone.20:50
ekcsgot it. looking.20:51
ekcsthat’s weird isn’t it. the one you pointed out isn’t even across nodes.20:53
thinrichsThat test passes, by the way20:53
thinrichsIt's on basically every node.  First one is a 'policy not found Alice'20:53
thinrichsMeant…basically every API20:54
thinrichsYour test passes, so it's not clearly a problem with my setup20:55
ekcsi see.20:56
ekcsi’m going to try running the same test but this time with only pe1. and see if that changes anything.20:56
thinrichsCould it be a synchronization problem?  Meaning that on the write, we update the DB, and then if the synchronizer doesn't run, it'll give an error on the next call.  But that API call forces the synchronizer to run, and so on the next call we get a success.20:57
thinrichsThat's a good thought with just 1 PE.  I can try it too.20:58
ekcspossible. but i’m looking at the code, and synchronization executed right after adding policy to DB.20:58
ekcsline 365 in agnostic.20:59
thinrichsSeems the problem goes away with just 1 PE20:59
ekcsanother hypothesis is somehow the db add didn’t take effect right away. could be a sqlite config issue not properly supporting corcurrent access by two procs.21:00
ekcsi’ll look into it.21:00
thinrichsBut then how did the policy-create-delete test work?21:01
thinrichsI tried to get the stack trace for these 400/500 errors to be included but couldn't seem to make it happen21:01
thinrichsI edited congress/application.py:60 so that it would include the stack-trace in the exception message, but that stacktrace didn't show up in the error message.  Was I doing something obviously wrong?21:03
ekcsmmm not sure. stacktrace is appended to ex.args[0]. osmething like traceback.format_exc() won’t work because the trace isn’t in the context of the calling process..21:05
ekcsanother way to get trace is to grab it from the self.outfiles21:06
ekcseach PE process logs to one of the outfiles.21:06
ekcsbut it should be included in str(e) or e.args[0].21:07
ekcssimplest way though should be just do what I did in setUp().21:09
ekcs        try:21:09
ekcs            helper.retry_check_function_return_value(21:09
ekcs                lambda: self.pe1.get().status_code, 200)21:09
ekcs        except tenacity.RetryError:21:09
ekcs            out = self.read_output_file(self.outfiles[-1])21:09
ekcs            LOG.error('PE1 failed to start. Process output:\n%s' % out)21:09
ekcs            raise21:09
thinrichsGood tip.  Thanks21:10
ekcsbut except Exception (maybe) and outfiles[0] for PE1.21:10
ekcsoh but the problem is you get a huge output because it includes everything up to that point not just the specific error.21:11
ekcsexcept Exception as e: \ LOG.error(str(e))21:12
ekcsshould work too.21:12
ekcsis that what you did?21:12
thinrichsSuper helpful… here's the first error:21:14
thinrichsAttributeError: 'Policy' object has no attribute 'abbr'21:14
thinrichs260 in agnostic inside synchronize_policies21:16
thinrichs  File "/opt/stack/congress/congress/policy_engines/agnostic.py", line 260, in synchronize_policies21:19
thinrichs    self.create_policy(p.name, id_=p.id, abbr=p.abbr,21:19
ekcsthat’s strange. according to db_policy_rules it should be p.abbreviation.21:21
ekcsbut then how does it not error in all sorts of other places.21:21
ekcsline 42 in db_policy_rules.py21:22
ekcsI’ll change it to the following and run again:21:23
ekcsself.create_policy(p.name, id_=p.id, abbr=p.abbreviation,21:23
*** thumpba has joined #congress21:31
thinrichsMoved on to the 2nd problem: where after inserting a rule can't query the rules.21:32
thinrichsHere the error is "Policy ID alice does not exist", which means the policy doesn't exist in self.theory in agnostic.21:32
thinrichsCan we talk on the phone for 7 minutes?  I have a meeting starting then that lasts pretty much the rest of the day.21:37
thinrichsekcs: ^21:37
ekcsyup.21:37
*** thumpba has quit IRC21:46
openstackgerritTim Hinrichs proposed openstack/congress: WIP - local HA tests  https://review.openstack.org/35892721:47
ekcsthinrichs: fixing the synchronize policies function p.abbreviation and p.description seems to have fixed everything. will push the code. very strange that anything actually worked the way it was.21:52
*** thinrichs has quit IRC21:59
openstackgerritOpenStack Proposal Bot proposed openstack/congress: Updated from global requirements  https://review.openstack.org/37575022:04
*** rrecio_ has quit IRC22:20

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