Thursday, 2020-04-09

*** eharney has quit IRC00:12
*** rloo has quit IRC00:38
rm_workzzzeek: hey, any tips on how I might be able to check the *writability* of a DB? without having any specific data I want to write to a specific table... we check general "upness" with `engine.scalar(select([1]))` but that doesn't help us detect if the DB is read-only00:45
rm_workhoping you might have a recommendation -- in MySQL I think I can just read the global `read_only`, but that's not portable00:46
rm_workalso i don't know if that's totally reliable anyway00:47
*** bauzas has quit IRC01:01
fungiand that probably won't detect if the underlying filesystem has been remounted read-only due to errors or the like01:11
zzzeekrm_work: "read only" usually means you dont have grants on the table you're targeting, so, "show grants"?  or are you trying to detect a read-only slave DB ?01:20
zzzeeknothing in that area would be portable across different DB types01:20
*** raildo has quit IRC01:24
rm_workyeah, the latter01:24
rm_workso it's looking like my best option for at least mysql is:01:25
rm_work`SELECT * FROM someTable WHERE id=0 FOR UPDATE;`01:25
rm_workbut yeah, not portable01:25
rm_workbut openstack only officially supports mysql now? so ... i mean ... ehhhhhhhhh i hate it so much but not sure what else I can do01:25
*** bauzas has joined #openstack-dev01:29
*** corvus has quit IRC01:48
*** corvus has joined #openstack-dev01:49
*** mrunge_ has joined #openstack-dev02:02
*** mrunge has quit IRC02:03
*** smarcet has joined #openstack-dev02:06
rm_workzzzeek: if i can do a select with_for_update() I think it'll work in a fairly general case?02:09
rm_workjust need to figure out how to get a table object to do a select on02:09
zzzeekrm_work: that might tell you something about one particular table on some database backends, but probably not most of them, not sqlite at least, and probably wont tell you the answer for all varities of "read only"02:15
zzzeek"read only" is not really a general thing with databases02:15
zzzeekalso this is one of those "you shouldnt have to be doing what you are trying to do" kinds of issues02:16
rm_workhmm02:16
rm_workwell, maybe it'd be close enough since really a single table is all i care about in this instance02:16
zzzeekmost database systems have grants02:16
zzzeekbut that is not the only reason a table owujldnt be writable02:16
zzzeekin SQLite if you dont have write permissions on the file, you wont be able to write02:17
zzzeeksome kinds of "read only" you dont find out about until you commit a transaction02:17
rm_workif an UPDATE fails and kicks me into a `DBConnectionError` exception block, i have to wait until a specific table is writeable again, then start a delay countdown before allowing writes again02:17
zzzeeka DBConnectionError, meaning, the database got disconnected?02:18
rm_workerr i guess it'd be ...02:18
zzzeekthat's not a thing that is specific to an UPDATE02:18
zzzeekthat's a network issue or the DB connection got corrupted or it timed out02:18
rm_workwhat error would that be actually02:18
rm_workI don't see like a ReadOnly one02:18
rm_work`ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement` is what MySQL says, for example02:19
zzzeekthere is no "readonly" error02:19
rm_workhow does that translate02:19
zzzeekah02:19
zzzeekthat's a totally mysql specific thing02:19
rm_workwhat exception does that raise02:19
rm_workand wouldn't the equivalent in like, postgres raise the same exception?02:20
zzzeekoslo.db if that's what we're talking about probably raises DBError for that02:20
zzzeeke.g. totally generic error02:20
zzzeekthat's not the kind of thing that "goes away" someone has to restart the DB without that flag02:20
rm_workah yes this does come from oslo_db, not SQLA directly bleh02:20
zzzeekthe driver probably does OperationalError for that02:21
rm_workI think you can just set it? `SET GLOBAL read_only = 0;`02:21
zzzeekOK02:21
rm_workok so maybe I need your advice on WTF to do at a higher level02:21
zzzeekdoesnt soudn like "the server is running with the --read-only option" then02:21
rm_workrather than how to do this specific thing02:21
zzzeeki would...not set that flag02:22
rm_workwell right02:22
rm_workbut if a master fails and we're forced onto a R/O slave; or something breaks internally and the DB goes R/O02:22
rm_workthis happens02:22
zzzeekbut that flag might be set for various forms of replication or warm standby etc.02:22
rm_workright, there are cases02:22
rm_workit happened last week during a DB upgrade here, apparently the runbook for that involves setting the galera cluster to R/O somehow first02:23
rm_workwhich I think is via that global02:23
zzzeekso if you want to fail gracefully for system was moved onto a read slave, you'd have to catch that exception and handle it specifically.  this is where oslo.db is useful because oslo.db can be enhanced to detect that error and give you the ReadOnly error you are looking for02:23
zzzeekoh its Galera?  galera "read only" is not a normal thing.  galera is multi-master and when a node goes into read only mode there shuld be haproxy that will bounce the connection over to another working node02:24
zzzeekso if you are getting that error in a brief window in failover again you'd want oslo.db to tell you that's a disconnecvt sitaution02:24
rm_workthe issue is, if the DB goes R/O for some time, we can't write healthchecks to our health table, so failovers try to initiate -- which don't work because they require a writeable DB too -- but then the second the DB becomes writable, before new healthchecks have a chance to be written for otherwise healthy nodes, the failovers suddenly WORK and everything is failed over basically instantly02:25
zzzeekyou can also use sqlalchemy event handlers to set that up as a disconnect too02:25
rm_work(this is for Octavia, but the idea is pretty generic I think)02:25
zzzeekbut this is galera, there should always be a writeable master unless you are dealing with the cluster losing quorum ?02:26
rm_worki think there's only two nodes in it, so yes02:26
rm_worki don't know the specifics, I could query folks02:26
zzzeekyou....cant have a galera cluster with only two nodes, really02:26
zzzeeki mean you *can* but it would be not smart02:26
zzzeekanyway this kind of thing is definiltey not very generalizable to other DBs galera is very unique02:27
rm_workhmm k02:27
zzzeekif you want the "we're in read only mode" to result in oslo.db  / sqlalchemy throwing away that connection and reconnecting, which we would assume goes to your haproxy that will give you a good connection on the next go, that can be done02:28
rm_workactually i'm assuming there's only one DB up, and it's in R/O, as the other is down for maintenance? but i'm trying to figure out WHY it's done that way from our DBAs02:28
zzzeekif galera can't do quorum then it goes into read only02:30
zzzeekwhich is why...you have an odd number of nodes02:30
rm_workah ok i guess this cluster isn't actually galera02:30
rm_work`Dual Master/Single Writer MySQL`02:30
zzzeekdepends on how they did it02:30
rm_work`There is no automatic failover so if 1 DB goes down the other is only RO until it is made master.`02:30
zzzeekwe use gaelra in this way, though three nodse02:30
zzzeekwe have haproxy point all traffic to one node at a time02:31
zzzeekso it is multi master / single writer02:31
rm_workhmm02:31
rm_worktrying to get more info still02:33
rm_workyeah ok so it's to a LB and the LB has a healthcheck for whether the DB node is set to "master" (if it hits the healthcheck endpoint and the result is MASTER then it's "up", otherwise it's down)02:46
rm_workso the DB has only one active member at a time02:46
*** smarcet has quit IRC02:46
rm_workI guess the way they went to RO was because BOTH were manually set to RO for some special maintenance operation02:46
zzzeekwell I wouldnt code for that :)02:47
rm_workyeah that's what i'm coming around to as well, lol02:47
zzzeekgotta run it's 11 pm here lates02:47
rm_workthanks for humoring me02:47
rm_worklater!02:47
*** smarcet has joined #openstack-dev03:03
*** smarcet has left #openstack-dev03:13
*** smarcet has joined #openstack-dev04:08
*** smarcet has quit IRC04:25
*** smarcet has joined #openstack-dev04:25
*** evrardjp has quit IRC04:37
*** evrardjp has joined #openstack-dev04:37
*** udesale has joined #openstack-dev04:40
*** logan- has quit IRC04:45
*** logan_ has joined #openstack-dev04:47
*** logan_ is now known as logan-04:48
*** _mlavalle_1 has joined #openstack-dev04:50
*** mlavalle has quit IRC04:53
*** dpawlik has joined #openstack-dev06:07
*** miloa has joined #openstack-dev06:11
*** ttsiouts has joined #openstack-dev06:30
*** slaweq_ has quit IRC06:36
*** dpawlik has quit IRC06:37
*** slaweq_ has joined #openstack-dev06:37
*** dpawlik has joined #openstack-dev06:39
*** slaweq_ has quit IRC06:41
*** _mlavalle_1 has quit IRC06:41
*** nightmare_unreal has joined #openstack-dev06:51
*** sshnaidm|afk is now known as sshnaidm06:55
*** jcapitao has joined #openstack-dev06:57
*** jtomasek has joined #openstack-dev06:57
*** jtomasek has quit IRC06:59
*** jtomasek has joined #openstack-dev06:59
*** ricolin has quit IRC06:59
*** slaweq_ has joined #openstack-dev07:00
*** dklyle has quit IRC07:00
*** tovin07 has joined #openstack-dev07:01
*** dancn has joined #openstack-dev07:02
*** slaweq_ is now known as slaweq07:03
*** luigi has joined #openstack-dev07:03
*** tovin07 has quit IRC07:06
*** dtantsur|afk is now known as dtantsur07:06
*** iurygregory has joined #openstack-dev07:11
*** tesseract has joined #openstack-dev07:15
*** rpittau|afk is now known as rpittau07:18
*** avolkov has joined #openstack-dev07:26
*** psachin has joined #openstack-dev07:37
*** tosky has joined #openstack-dev07:42
*** ricolin has joined #openstack-dev07:44
*** ralonsoh has joined #openstack-dev07:45
*** abdysn has joined #openstack-dev07:54
*** jpich has joined #openstack-dev07:55
*** threestrands has quit IRC08:00
*** __ministry has joined #openstack-dev08:49
*** surpatil has joined #openstack-dev09:02
*** tkajinam has quit IRC09:03
*** dpawlik has quit IRC09:10
*** surpatil has quit IRC09:30
*** udesale_ has joined #openstack-dev09:34
*** udesale has quit IRC09:38
*** dpawlik has joined #openstack-dev09:49
*** d34dh0r53 has quit IRC10:02
*** d34dh0r53 has joined #openstack-dev10:03
*** jpich has quit IRC10:06
*** jpich has joined #openstack-dev10:07
*** Abdallahyas has joined #openstack-dev10:07
*** abdysn has quit IRC10:10
*** gfidente|afk is now known as gfidente10:11
*** rpittau is now known as rpittau|bbl10:13
*** tonythomas has joined #openstack-dev10:19
*** zadock has joined #openstack-dev10:24
*** zadock has quit IRC10:25
openstackgerritThierry Carrez proposed openstack/governance master: Appoint Ben Nemec as Oslo PTL  https://review.opendev.org/71865510:36
*** ttsiouts has quit IRC10:46
*** ttsiouts has joined #openstack-dev10:51
*** jcapitao is now known as jcapitao_lunch10:59
*** ttsiouts has quit IRC11:07
*** ttsiouts has joined #openstack-dev11:26
*** ttsiouts has quit IRC11:42
*** ttsiouts has joined #openstack-dev11:43
*** dpawlik has quit IRC11:56
*** rpittau|bbl is now known as rpittau11:57
*** nweinber has joined #openstack-dev12:02
*** eharney has joined #openstack-dev12:03
*** Abdallahyas has quit IRC12:07
*** dpawlik has joined #openstack-dev12:08
*** raildo has joined #openstack-dev12:10
*** ierdem has joined #openstack-dev12:12
ierdem Hello, i am trying to install murano on devstack but it throws an error "murano-dashboard requires Python '>=3.6' but the running Python is 2.7.17". I have python 3.6 on my environmet, can you help me please?12:12
*** jcapitao_lunch is now known as jcapitao12:13
*** igordc has quit IRC12:18
*** kgiusti has joined #openstack-dev12:20
*** rloo has joined #openstack-dev12:23
*** psachin has quit IRC12:26
*** iurygregory has quit IRC12:43
*** iurygregory has joined #openstack-dev12:44
*** ttsiouts has quit IRC12:48
*** ttsiouts has joined #openstack-dev12:50
*** lbragstad_ has joined #openstack-dev12:52
*** lbragstad has quit IRC12:54
*** ttsiouts has quit IRC12:59
*** ttsiouts has joined #openstack-dev13:03
*** dancn has quit IRC13:03
*** dancn has joined #openstack-dev13:09
*** mrunge_ is now known as mrunge13:14
*** ttsiouts has quit IRC13:19
*** ttsiouts has joined #openstack-dev13:29
*** priteau has joined #openstack-dev13:48
*** ttsiouts has quit IRC13:49
*** ttsiouts has joined #openstack-dev13:49
*** rcernin has quit IRC13:54
*** nightmare_unreal has quit IRC14:00
*** abdysn has joined #openstack-dev14:04
*** ttsiouts has quit IRC14:05
*** d34dh0r53 has quit IRC14:08
*** d34dh0r53 has joined #openstack-dev14:10
*** tonythomas has quit IRC14:10
*** d34dh0r53 has quit IRC14:11
*** tkajinam has joined #openstack-dev14:13
*** dave-mccowan has joined #openstack-dev14:14
*** lpetrut has joined #openstack-dev14:19
*** lbragstad_ is now known as lbragstad14:20
*** nightmare_unreal has joined #openstack-dev14:26
*** dave-mccowan has quit IRC14:30
*** Hien has quit IRC14:35
*** Hien has joined #openstack-dev14:37
*** ttsiouts has joined #openstack-dev14:45
*** dklyle has joined #openstack-dev14:47
*** ttsiouts has quit IRC14:50
*** dancn has quit IRC14:51
*** abdysn has quit IRC14:54
*** abdysn has joined #openstack-dev14:54
*** armstrong has joined #openstack-dev14:58
*** dancn has joined #openstack-dev14:59
*** abdysn has quit IRC15:00
*** gyee has joined #openstack-dev15:05
*** ttsiouts has joined #openstack-dev15:05
*** slaweq has quit IRC15:06
*** dklyle has quit IRC15:12
*** dklyle has joined #openstack-dev15:18
*** slaweq has joined #openstack-dev15:21
*** ierdem has quit IRC15:24
*** avolkov has quit IRC15:25
*** luigi has quit IRC15:26
*** ttsiouts has quit IRC15:45
*** tkajinam has quit IRC15:49
*** diablo_rojo has joined #openstack-dev15:57
*** rpittau is now known as rpittau|afk15:59
*** mikefix has quit IRC16:02
*** iurygregory has quit IRC16:03
*** dpawlik has quit IRC16:06
*** smarcet has quit IRC16:23
*** lpetrut has quit IRC16:26
*** jpich has quit IRC16:28
*** udesale_ has quit IRC16:35
*** evrardjp has quit IRC16:37
*** evrardjp has joined #openstack-dev16:37
*** jcapitao has quit IRC16:37
*** dtantsur is now known as dtantsur|afk16:46
*** nightmare_unreal has quit IRC16:50
*** ccamposr__ has quit IRC17:02
*** ricolin has quit IRC17:04
*** sshnaidm is now known as sshnaidm|afk17:12
*** ccamposr has joined #openstack-dev17:16
*** priteau has quit IRC17:22
*** smarcet has joined #openstack-dev17:22
*** priteau has joined #openstack-dev17:29
*** smarcet has quit IRC17:34
*** priteau has quit IRC17:34
*** mlavalle has joined #openstack-dev17:52
*** priteau has joined #openstack-dev17:55
*** priteau has quit IRC17:59
*** sshnaidm|afk is now known as sshnaidm|off18:02
*** ccamposr__ has joined #openstack-dev18:17
*** dancn has quit IRC18:20
*** ralonsoh has quit IRC18:20
*** ccamposr__ has quit IRC18:21
*** ccamposr has quit IRC18:23
*** dancn has joined #openstack-dev18:25
*** markmcclain has quit IRC18:27
*** markmcclain has joined #openstack-dev18:29
*** priteau has joined #openstack-dev18:33
*** priteau has quit IRC18:38
*** spsurya_ has quit IRC19:08
*** priteau has joined #openstack-dev19:09
*** shaner has joined #openstack-dev19:09
*** priteau has quit IRC19:14
*** diablo_rojo has quit IRC19:16
*** diablo_rojo has joined #openstack-dev19:17
*** Lucas_Gray has joined #openstack-dev19:20
*** markmcclain has quit IRC19:22
*** markmcclain has joined #openstack-dev19:24
*** Lucas_Gray has quit IRC19:26
*** __ministry has quit IRC19:26
*** Lucas_Gray has joined #openstack-dev19:27
*** Lucas_Gray has quit IRC19:53
*** gfidente is now known as gfidente|afk19:53
*** priteau has joined #openstack-dev19:54
*** tonythomas has joined #openstack-dev19:55
*** armstrong has quit IRC19:57
*** tesseract has quit IRC20:00
*** priteau has quit IRC20:05
*** tesseract has joined #openstack-dev20:06
*** dancn has quit IRC20:08
*** tesseract has quit IRC20:17
*** Lucas_Gray has joined #openstack-dev20:23
*** raildo_ has joined #openstack-dev20:24
*** raildo has quit IRC20:26
*** Lucas_Gray has quit IRC20:28
*** dancn has joined #openstack-dev20:32
*** dancn has quit IRC20:40
*** jtomasek has quit IRC20:41
*** markmcclain has quit IRC20:42
*** markmcclain has joined #openstack-dev20:42
*** owalsh is now known as owalsh_afk20:43
*** dancn has joined #openstack-dev20:45
*** dancn has quit IRC20:52
*** dancn has joined #openstack-dev21:00
*** Lucas_Gray has joined #openstack-dev21:09
*** dlbewley has joined #openstack-dev21:11
*** Lucas_Gray has quit IRC21:17
*** Lucas_Gray has joined #openstack-dev21:18
*** Lucas_Gray has quit IRC21:38
*** Lucas_Gray has joined #openstack-dev21:39
*** tonythomas has quit IRC22:05
*** dancn has quit IRC22:13
*** slaweq has quit IRC22:14
*** nweinber has quit IRC22:15
*** slaweq has joined #openstack-dev22:15
*** slaweq has quit IRC22:20
*** raildo_ has quit IRC22:21
*** tkajinam has joined #openstack-dev22:53
*** Lucas_Gray has quit IRC23:01
*** Lucas_Gray has joined #openstack-dev23:02
*** tosky has quit IRC23:08
*** diablo_rojo has quit IRC23:11
*** Lucas_Gray has quit IRC23:18
*** rloo has quit IRC23:55

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