Something's not going right here: $ /usr/local/bin/peeringdb sync Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1470142503 HTTP/1.1" 200 None org last update 1470142503 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1470088505 HTTP/1.1" 200 None fac last update 1470088505 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=1469642106 HTTP/1.1" 200 None net last update 1469642106 110 changed data to be processed 110 Traceback (most recent call last): File "/usr/local/bin/peeringdb", line 9, in <module> load_entry_point('peeringdb==0.4.3.2', 'console_scripts', 'peeringdb')() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/peeringdb/cli.py", line 169, in sync db.sync() File "/usr/local/lib/python2.7/dist-packages/peeringdb/localdb.py", line 140, in sync call_command('pdb_sync', interactive=False) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 14675 does not exist.']} ~paul
Hi, Cannot reproduce the issue on my local sync - hadn't run it since Jul 31st and updated without errors just now. I'd appreciate if you could answer these questions to help us identify the cause: 1. which version of py-peeringdb are you running 2. "org last update 1470142503 0 changed" indicates that you ran the script earlier today, did that produce any errors? particularly with the org sync? if so which error? 3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data) thanks, Stefan On 02/08/16 18:38, Paul Vlaar wrote:
Something's not going right here:
$ /usr/local/bin/peeringdb sync Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1470142503 HTTP/1.1" 200 None org last update 1470142503 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1470088505 HTTP/1.1" 200 None fac last update 1470088505 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=1469642106 HTTP/1.1" 200 None net last update 1469642106 110 changed data to be processed 110 Traceback (most recent call last): File "/usr/local/bin/peeringdb", line 9, in <module> load_entry_point('peeringdb==0.4.3.2', 'console_scripts', 'peeringdb')() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/peeringdb/cli.py", line 169, in sync db.sync() File "/usr/local/lib/python2.7/dist-packages/peeringdb/localdb.py", line 140, in sync call_command('pdb_sync', interactive=False) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 14675 does not exist.']}
~paul _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
On 2/8/16 17:52, Stefan Pratter wrote:
Cannot reproduce the issue on my local sync - hadn't run it since Jul 31st and updated without errors just now.
I'd appreciate if you could answer these questions to help us identify the cause:
1. which version of py-peeringdb are you running
I just upgraded to 0.4.4.1, same problem with reference to org id 14675.
2. "org last update 1470142503 0 changed" indicates that you ran the script earlier today, did that produce any errors? particularly with > the org sync? if so which error?
Unsure, since I run this every hour from cron and hadn't look at the output for a few weeks (and is over-written on each run).
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that. Thanks, ~paul
I just upgraded to 0.4.4.1, same problem with reference to org id 14675.
Upgrading the version most likely wouldn't fix already existing bad data, out of curiosity what version were you running before the upgrade? Without knowing the exact reason why import for the specified org failed at some point, this seems like a likely candidate to address the cause: https://github.com/peeringdb/peeringdb/issues/32
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that.
Understood - in case you are looking to fix your db without wiping it, the error you are seeing is from the specified org (14675) missing from your db. https://www.peeringdb.com/api/org/14675?depth=1&pretty Since it only has it's name set, it should be easy to manually insert that into your db, and see if that fixes it. Make sure to use the EXACT id, name, updated and created values. If you do that and there are more errors after this, a clean sync would most likely be the best way to go. Stefan On 02/08/16 19:48, Paul Vlaar wrote:
On 2/8/16 17:52, Stefan Pratter wrote:
Cannot reproduce the issue on my local sync - hadn't run it since Jul 31st and updated without errors just now.
I'd appreciate if you could answer these questions to help us identify the cause:
1. which version of py-peeringdb are you running
I just upgraded to 0.4.4.1, same problem with reference to org id 14675.
2. "org last update 1470142503 0 changed" indicates that you ran the script earlier today, did that produce any errors? particularly with > the org sync? if so which error?
Unsure, since I run this every hour from cron and hadn't look at the output for a few weeks (and is over-written on each run).
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that.
Thanks,
~paul _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
On 2/8/16 19:31, Stefan Pratter wrote:
Upgrading the version most likely wouldn't fix already existing bad data, out of curiosity what version were you running before the upgrade?
I was running 0.4.3.2.
Without knowing the exact reason why import for the specified org failed at some point, this seems like a likely candidate to address the cause: https://github.com/peeringdb/peeringdb/issues/32
Aha. -snip-
If you do that and there are more errors after this, a clean sync would most likely be the best way to go.
I just bit the bullet and wiped the DB. I need to be careful with the drop tables command as I have other tables in the same DB that need to be preserved, but dropping the PeeringDB ones by hand and doing a full sync fixed the issue for me. Probably a good idea for me to retain logs for the partial syncs so that I can give more helpful historic debug, next time. Thanks, ~paul
This just keeps happening after a week or so of running "peeringdb sync" successfully: Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1474062903 HTTP/1.1" 200 None Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1473922504 HTTP/1.1" 200 None Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. org last update 1474062903 0 changed data to be processed 0 fac last update 1473922504 11 changed data to be processed 11 Traceback (most recent call last): File "/usr/local/bin/peeringdb", line 9, in <module> load_entry_point('peeringdb==0.4.4.1', 'console_scripts', 'peeringdb')() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/peeringdb-0.4.4.1-py2.7.egg/peeringdb/cli.py", line 167, in sync db.sync() File "/usr/local/lib/python2.7/dist-packages/peeringdb-0.4.4.1-py2.7.egg/peeringdb/localdb.py", line 140, in sync call_command('pdb_sync', interactive=False) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/local/lib/python2.7/dist-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 15066 does not exist.']} Should I just give up on the idea that we can keep doing incremental updates, and run a full re-create every 12 hours or so? Anyone else running into this problem? ~paul
On 20/9/16 18:02, Martin J. Levy wrote:
Yes. However have you tried powering it off and on again? Seriously ...
: for x in 1 2 3 4 5 do peeringdb sync done
... I find it fixes itself somewhat after a few runs. Try it.
Thing is, I am running it every 12 hours already, and once it gets to this state, it seems to remain screwed. ~paul
On Tue, 20 Sep 2016, Paul Vlaar wrote:
On 20/9/16 18:02, Martin J. Levy wrote:
Yes. However have you tried powering it off and on again? Seriously ...
: for x in 1 2 3 4 5 do peeringdb sync done
... I find it fixes itself somewhat after a few runs. Try it.
Thing is, I am running it every 12 hours already, and once it gets to this state, it seems to remain screwed.
I've found a fresh sync (delete existing sqlite file), is needed when this happens. I have the output go to my inbox so I know when it needs to be fixed. I've reported the problem. See and feel free to add to: https://github.com/peeringdb/peeringdb/issues/32 (32 was inspired by: https://github.com/peeringdb/peeringdb/issues/24) Chris
We've pushed an experimental fix to https://github.com/peeringdb/django-peeringdb@0.2.2.2, which we believe should fix most if not all of the sync issues we have been seeing. It also fixes the updated and created fields to be in sync with their actual values as they exist in peeringdb, as it related to the issue at hand. Since this is experimental at this point we have not released it to pip yet, we plan to do so once there has been sufficient testing. Until then if you want run sync with this fix you will have to pip install django-peeringdb manually from github: pip uninstall django-peeringdb -y pip install git+https://github.com/peeringdb/django-peeringdb@0.2.2.2 Since this fixes the updated \ created fields it is recommended you start from a fresh database, but in the tests we have done it didn't cause any immediate problems to just do an incremental sync on a 0.2.2 database that has local times in those fields. Finally i would like to note that this is not the proposed fix from #32 (atomic sync), as that is requiring a complete refactor of the client and not ready for release. Stefan On 20/09/16 20:29, Chris Caputo wrote:
On Tue, 20 Sep 2016, Paul Vlaar wrote:
On 20/9/16 18:02, Martin J. Levy wrote:
Yes. However have you tried powering it off and on again? Seriously ...
: for x in 1 2 3 4 5 do peeringdb sync done
... I find it fixes itself somewhat after a few runs. Try it.
Thing is, I am running it every 12 hours already, and once it gets to this state, it seems to remain screwed.
I've found a fresh sync (delete existing sqlite file), is needed when this happens. I have the output go to my inbox so I know when it needs to be fixed. I've reported the problem. See and feel free to add to:
https://github.com/peeringdb/peeringdb/issues/32
(32 was inspired by: https://github.com/peeringdb/peeringdb/issues/24)
Chris _______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
On 20/9/16 21:35, Stefan Pratter wrote: -snip-
pip uninstall django-peeringdb -y pip install git+https://github.com/peeringdb/django-peeringdb@0.2.2.2
That seems to have fixed it: pvlaar@peering:~$ /usr/local/bin/peeringdb sync Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1474390503 HTTP/1.1" 200 None org last update 1474390503 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1473922504 HTTP/1.1" 200 None fac last update 1473922504 27 changed data to be processed 27 org.15066 not found locally, trying to fetch object... Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org/15066?depth=0 HTTP/1.1" 200 None Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=1473944104 HTTP/1.1" 200 None net last update 1473944104 111 changed data to be processed 111 org.15068 not found locally, trying to fetch object... Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org/15068?depth=0 HTTP/1.1" 200 None org.14997 not found locally, trying to fetch object... Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org/14997?depth=0 HTTP/1.1" 200 None Starting new HTTPS connection (1): www.peeringdb.com "GET /api/ix?since=1473443705 HTTP/1.1" 200 None ix last update 1473443705 14 changed data to be processed 14 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/ixfac?since=1473782107 HTTP/1.1" 200 None ixfac last update 1473782107 46 changed data to be processed 46 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/ixlan?since=1473540907 HTTP/1.1" 200 None ixlan last update 1473540907 10 changed data to be processed 10 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/ixpfx?since=1473245709 HTTP/1.1" 200 None ixpfx last update 1473245709 19 changed data to be processed 19 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/poc?since=1473944108 HTTP/1.1" 200 None poc last update 1473944108 84 changed data to be processed 84 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/netfac?since=1473926111 HTTP/1.1" 200 None netfac last update 1473926111 531 changed data to be processed 531 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/netixlan?since=1473944112 HTTP/1.1" 200 None netixlan last update 1473944112 96 changed data to be processed 96 pvlaar@peering:~$
Since this fixes the updated \ created fields it is recommended you start from a fresh database, but in the tests we have done it didn't cause any immediate problems to just do an incremental sync on a 0.2.2 database that has local times in those fields.
I ran this on the existing DB and it seems to have gone through okay. I'll keep an eye on future runs. Thanks! ~paul -- Paul Vlaar Contracting for DNS Infrastructure Group, Afilias PLC e-mail: pvlaar@afilias.info
* Paul Vlaar <pvlaar@afilias.info> [160802 18:48 +0200]:
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that. Is this MySQL?
Interestingly I’m seeing this error also, trying to sync to a new, clean database. I am running version 0.4.3, so you’re probably going to tell me to upgrade ... Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1470340115 HTTP/1.1" 200 None org last update 1470340115 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1470340126 HTTP/1.1" 200 None fac last update 1470340126 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=0 HTTP/1.1" 200 None net last update 0 6921 changed data to be processed 6921 Traceback (most recent call last): File "/bin/peeringdb", line 11, in <module> sys.exit(cli()) File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python2.7/site-packages/peeringdb/cli.py", line 125, in sync db.sync() File "/usr/lib/python2.7/site-packages/peeringdb/localdb.py", line 97, in sync call_command('pdb_sync', interactive=False) File "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/lib/python2.7/site-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/lib64/python2.7/site-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 8897 does not exist.’]}
On Aug 3, 2016, at 12:10 AM, Matt Griswold <grizz@20c.com> wrote:
* Paul Vlaar <pvlaar@afilias.info> [160802 18:48 +0200]:
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that. Is this MySQL?
Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
I have no issue, but since we are running into this so often, I believe we should raise it as a feature request to have a fix capability in the pdb_sync command. -- Eric Loos -----Original Message----- From: Pdb-tech [mailto:pdb-tech-bounces@lists.peeringdb.com] On Behalf Of Greg Dendy Sent: Thursday 4 August 2016 22:02 To: pdb-tech@lists.peeringdb.com Subject: Re: [PDB Tech] peeringdb sync error Interestingly I’m seeing this error also, trying to sync to a new, clean database. I am running version 0.4.3, so you’re probably going to tell me to upgrade ... Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1470340115 HTTP/1.1" 200 None org last update 1470340115 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1470340126 HTTP/1.1" 200 None fac last update 1470340126 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=0 HTTP/1.1" 200 None net last update 0 6921 changed data to be processed 6921 Traceback (most recent call last): File "/bin/peeringdb", line 11, in <module> sys.exit(cli()) File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python2.7/site-packages/peeringdb/cli.py", line 125, in sync db.sync() File "/usr/lib/python2.7/site-packages/peeringdb/localdb.py", line 97, in sync call_command('pdb_sync', interactive=False) File "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/lib/python2.7/site-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/lib64/python2.7/site-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 8897 does not exist.’]}
On Aug 3, 2016, at 12:10 AM, Matt Griswold <grizz@20c.com> wrote:
* Paul Vlaar <pvlaar@afilias.info> [160802 18:48 +0200]:
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that. Is this MySQL?
Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
_______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech ________________________________ **** DISCLAIMER**** http://www.bics.com/maildisclaimer/
Upgraded to 0.4.4 and now crashing out with: django.core.exceptions.ValidationError: {'net': [u'network instance with id 7 does not exist.’]} This was a clean database, no existing tables. Suggestions?
On Aug 4, 2016, at 10:31 PM, LOOS Eric (BCS/CBU) <eric.loos@bics.com> wrote:
I have no issue, but since we are running into this so often, I believe we should raise it as a feature request to have a fix capability in the pdb_sync command.
-- Eric Loos
-----Original Message----- From: Pdb-tech [mailto:pdb-tech-bounces@lists.peeringdb.com] On Behalf Of Greg Dendy Sent: Thursday 4 August 2016 22:02 To: pdb-tech@lists.peeringdb.com Subject: Re: [PDB Tech] peeringdb sync error
Interestingly I’m seeing this error also, trying to sync to a new, clean database. I am running version 0.4.3, so you’re probably going to tell me to upgrade ...
Operations to perform: Synchronize unmigrated apps: django_peeringdb Apply all migrations: admin, contenttypes, auth, sessions Synchronizing apps without migrations: Creating tables... Running deferred SQL... Installing custom SQL... Running migrations: No migrations to apply. Starting new HTTPS connection (1): www.peeringdb.com "GET /api/org?since=1470340115 HTTP/1.1" 200 None org last update 1470340115 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/fac?since=1470340126 HTTP/1.1" 200 None fac last update 1470340126 0 changed data to be processed 0 Starting new HTTPS connection (1): www.peeringdb.com "GET /api/net?since=0 HTTP/1.1" 200 None net last update 0 6921 changed data to be processed 6921 Traceback (most recent call last): File "/bin/peeringdb", line 11, in <module> sys.exit(cli()) File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python2.7/site-packages/peeringdb/cli.py", line 125, in sync db.sync() File "/usr/lib/python2.7/site-packages/peeringdb/localdb.py", line 97, in sync call_command('pdb_sync', interactive=False) File "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", line 120, in call_command return command.execute(*args, **defaults) File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 445, in execute output = self.handle(*args, **options) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 85, in handle self.sync(tables) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 92, in sync self.update_db(cls, self.get_objs(cls)) File "/usr/lib/python2.7/site-packages/django_peeringdb/management/commands/pdb_sync.py", line 127, in update_db sync.sync_obj(cls, row) File "/usr/lib/python2.7/site-packages/django_peeringdb/sync.py", line 25, in sync_obj obj.full_clean() File "/usr/lib64/python2.7/site-packages/django/db/models/base.py", line 1171, in full_clean raise ValidationError(errors) django.core.exceptions.ValidationError: {'org': [u'organization instance with id 8897 does not exist.’]}
On Aug 3, 2016, at 12:10 AM, Matt Griswold <grizz@20c.com> wrote:
* Paul Vlaar <pvlaar@afilias.info> [160802 18:48 +0200]:
3. Does the problem persist if you do it on a fresh db (eg. after running the drop_tables command, WARNING: this will delete all existing data)
I am not ready to do this, as there's a live system feeding from this data. I suppose I may have to resort to that. Is this MySQL?
Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
_______________________________________________ Pdb-tech mailing list Pdb-tech@lists.peeringdb.com http://lists.peeringdb.com/cgi-bin/mailman/listinfo/pdb-tech
________________________________
**** DISCLAIMER**** http://www.bics.com/maildisclaimer/
participants (7)
-
Chris Caputo -
Greg Dendy -
LOOS Eric (BCS/CBU) -
Martin J. Levy -
Matt Griswold -
Paul Vlaar -
Stefan Pratter