Bug 12506

Summary: location-importer write fails to export the database
Product: Location Database Reporter: Peter Müller <peter.mueller>
Component: liblocAssignee: Michael Tremer <michael.tremer>
Status: CLOSED FIXED QA Contact: Peter Müller <peter.mueller>
Severity: Crash    
Priority: - Unknown -    
Version: unspecified   
Hardware: all   
OS: All   
Bug Depends on:    
Bug Blocks: 12499    

Description Peter Müller 2020-10-21 09:11:50 UTC
"time location-importer --debug --database-host=x --database-name=x --database-username=x --database-password=x write test.db" currently returns:

Traceback (most recent call last):
  File "/usr/bin/location-importer", line 1043, in <module>
    main()
  File "/usr/bin/location-importer", line 1041, in main
    c.run()
  File "/usr/bin/location-importer", line 128, in run
    ret = args.func(args)
  File "/usr/bin/location-importer", line 322, in handle_write
    network = writer.add_network(row.network)
SystemError: <method 'add_network' of 'location.Writer' objects> returned NULL without setting an error                                                                                      

real    98m2.451s
user    1m4.284s
sys     0m0.977s

This is kind of a show-stopper as it prevents me from resolving #12499 et al., since I have no idea how big the database will become and how long the entire export process will take.

My suggestion of this is to be affecting location01 as well.
Comment 1 Michael Tremer 2020-10-23 10:00:22 UTC
> https://git.ipfire.org/?p=location/libloc.git;a=commitdiff;h=26ab419b68d166f932db1f97c38cb9d793d04187

I do not know exactly why we have single IP addresses in the database, but because of that, this crashed. I have now changed it so that it would return a better error message and will accept single IP addresses.
Comment 2 Peter Müller 2020-12-22 10:29:29 UTC
This seems to be fixed meanwhile, I did not observe this error again.