2017-03-15 18:00:11.200296: Attempting to update <ISP u'FMA'>
last successful update=2015-11-12 11:00:04.083865+01:00
last update attempt=2015-11-13 14:00:03.556809+01:00
next update was scheduled 487 days, 16:00:06.848470 ago
strike=0
Traceback (most recent call last):
File "ffdnispdb/cron_task.py", line 151, in <module>
db.session.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 354, in commit
self._prepare_impl()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 323, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 207, in pre_save_hook
v.pre_save(sess)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 97, in pre_save
assert self.shortname == self.json['shortname']
AssertionError
❯ curl -s https://moncoin.faimaison.net/isp.json |jq .
{
"subscriberCount": 79,
"website": "https://www.faimaison.net/",
"name": "FAImaison",
"otherWebsites": {
"Wiki": "https://wiki.faimaison.net/",
"Gitlab": "https://git.faimaison.net/"
},
"memberCount": 109,
"progressStatus": 7,
"chatrooms": [
"irc://irc.geeknode.org/#faimaison"
],
"registeredOffice": {
"region": "Loire Atlantique",
"street-address": "7 rue Maurice Sibille",
"postal-code": "44000",
"country-name": "France",
"locality": "Nantes"
},
"coordinates": {
"latitude": 47.2169,
"longitude": -1.5549
},
"mainMailingList": "info@faimaison.net",
"coveredAreas": [
{
"technologies": [
"wifi"
],
"name": "Accès internet haut débit sans-fil"
},
{
"technologies": [
"dsl"
],
"name": "ADSL marque blanche FDN"
},
{
"technologies": [
"dsl"
],
"name": "VPN"
},
{
"technologies": [
"cube"
],
"name": "Nantes et environs"
}
],
"version": 0.1,
"ffdnMemberSince": "2012-06-04",
"logoURL": "https://www.faimaison.net/theme/images/logo.png",
"shortname": "FAImaison",
"creationDate": "2011-01-19",
"email": "contact@faimaison.net",
"description": "FAImaison est un fournisseur d'accès à internet offrant un service sur Nantes et ses alentours"
}
```
2017-03-15 18:00:11.200296: Attempting to update <ISP u'FMA'>
last successful update=2015-11-12 11:00:04.083865+01:00
last update attempt=2015-11-13 14:00:03.556809+01:00
next update was scheduled 487 days, 16:00:06.848470 ago
strike=0
Traceback (most recent call last):
File "ffdnispdb/cron_task.py", line 151, in <module>
db.session.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 354, in commit
self._prepare_impl()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 323, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 207, in pre_save_hook
v.pre_save(sess)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 97, in pre_save
assert self.shortname == self.json['shortname']
AssertionError
```
```
❯ curl -s https://moncoin.faimaison.net/isp.json |jq .
{
"subscriberCount": 79,
"website": "https://www.faimaison.net/",
"name": "FAImaison",
"otherWebsites": {
"Wiki": "https://wiki.faimaison.net/",
"Gitlab": "https://git.faimaison.net/"
},
"memberCount": 109,
"progressStatus": 7,
"chatrooms": [
"irc://irc.geeknode.org/#faimaison"
],
"registeredOffice": {
"region": "Loire Atlantique",
"street-address": "7 rue Maurice Sibille",
"postal-code": "44000",
"country-name": "France",
"locality": "Nantes"
},
"coordinates": {
"latitude": 47.2169,
"longitude": -1.5549
},
"mainMailingList": "info@faimaison.net",
"coveredAreas": [
{
"technologies": [
"wifi"
],
"name": "Accès internet haut débit sans-fil"
},
{
"technologies": [
"dsl"
],
"name": "ADSL marque blanche FDN"
},
{
"technologies": [
"dsl"
],
"name": "VPN"
},
{
"technologies": [
"cube"
],
"name": "Nantes et environs"
}
],
"version": 0.1,
"ffdnMemberSince": "2012-06-04",
"logoURL": "https://www.faimaison.net/theme/images/logo.png",
"shortname": "FAImaison",
"creationDate": "2011-01-19",
"email": "contact@faimaison.net",
"description": "FAImaison est un fournisseur d'accès à internet offrant un service sur Nantes et ses alentours"
}
```
(10:16:18) taziden: du coup, je suis d'avis de changer ce bout de code dans db
(10:16:20) taziden: ffdnispdb/models.py: if 'shortname' in self.json:
(10:16:22) taziden: ffdnispdb/models.py: assert self.shortname == self.json['shortname']
(10:16:45) taziden: pour faire en sorte que si self.shortname diffère de self.json['shortname'], la valeur de self.shortname devient self.json['shortname']
(10:17:05) taziden: problem solved
seems a good idea.
Some IRC logs, in french:
```
(10:16:18) taziden: du coup, je suis d'avis de changer ce bout de code dans db
(10:16:20) taziden: ffdnispdb/models.py: if 'shortname' in self.json:
(10:16:22) taziden: ffdnispdb/models.py: assert self.shortname == self.json['shortname']
(10:16:45) taziden: pour faire en sorte que si self.shortname diffère de self.json['shortname'], la valeur de self.shortname devient self.json['shortname']
(10:17:05) taziden: problem solved
```
seems a good idea.
( added by ff406e3c72 "Sanity check in the ISP model" )
Does this assertions really needed ? https://code.ffdn.org/FFDN/ffdn-db/src/master/ffdnispdb/models.py#L93-L97
( added by ff406e3c720656bf659e53674b9c7230ad60c21a "Sanity check in the ISP model" )
@taziden, you're change doesn't fix the issue, please see cron.log file.
2017-03-20 11:20:02.966251: Attempting to update <ISP u'FAImaison'>
last successful update=2015-11-12 11:00:04.083865+01:00
last update attempt=2017-03-15 21:00:05.436072+01:00
next update was scheduled 492 days, 9:19:58.620715 ago
strike=0
Traceback (most recent call last):
File "ffdnispdb/cron_task.py", line 113, in <module>
db.session.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 354, in commit
self._prepare_impl()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 323, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 207, in pre_save_hook
v.pre_save(sess)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 97, in pre_save
assert self.shortname == self.json['shortname']
AssertionError
@taziden, you're change doesn't fix the issue, please see `cron.log` file.
```
2017-03-20 11:20:02.966251: Attempting to update <ISP u'FAImaison'>
last successful update=2015-11-12 11:00:04.083865+01:00
last update attempt=2017-03-15 21:00:05.436072+01:00
next update was scheduled 492 days, 9:19:58.620715 ago
strike=0
Traceback (most recent call last):
File "ffdnispdb/cron_task.py", line 113, in <module>
db.session.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 721, in commit
self.transaction.commit()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 354, in commit
self._prepare_impl()
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 323, in _prepare_impl
self.session.dispatch.before_commit(self.session)
File "/srv/www/ffdn.org/db/env/local/lib/python2.7/site-packages/sqlalchemy/event.py", line 372, in __call__
fn(*args, **kw)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 207, in pre_save_hook
v.pre_save(sess)
File "/srv/www/ffdn.org/db/ffdn-db/ffdnispdb/models.py", line 97, in pre_save
assert self.shortname == self.json['shortname']
AssertionError
```
Is an ISP update able to block other updates because it raises an exception and the whole process aborts? If so, shouldn't each update be wrapped in a catch-all block?
Is an ISP update able to block other updates because it raises an exception and the whole process aborts? If so, shouldn't each update be wrapped in a catch-all block?
This is fixed for FMA and Rhizome manually by updating the sqlite database directly :
update isp set shortname = "FAImaison" where id == 50;
Some IRC logs, in french:
seems a good idea.
Does this assertions really needed ? https://code.ffdn.org/FFDN/ffdn-db/src/master/ffdnispdb/models.py#L93-L97
( added by
ff406e3c72
"Sanity check in the ISP model" )@taziden, you're change doesn't fix the issue, please see
cron.log
file.crying internally
ok for the assertion on the name, but indeed for the shortname, I don't know… :-/
@taziden : https://db.ffdn.org/isp/50/ shortname is still "FMA", despite your database manual update.
Damn. Some caching issue somewhere ?
Is an ISP update able to block other updates because it raises an exception and the whole process aborts? If so, shouldn't each update be wrapped in a catch-all block?