Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingQueryArgument when importing Ipv6 records #5

Open
samuelet opened this issue Apr 4, 2024 · 8 comments
Open

MissingQueryArgument when importing Ipv6 records #5

samuelet opened this issue Apr 4, 2024 · 8 comments

Comments

@samuelet
Copy link

samuelet commented Apr 4, 2024

Not sure if it's a bug or i'm missing something in my environment, but importing ipv6 records from a CSV file, or via web, always throws a MissingQueryArgument error and nothing is imported.

Teemip Version
3.1.4-2312

#Output format: details
#Class: AAAARecord
#Separator: ,
#Qualifier: "
#Charset Encoding:UTF-8
#Date format: <none>
#Localize: no
#Data Size: 505
#Data Lines: 5
#Simulate: 1
#Columns: name, overwrite_zone_ttl, ttl, ip_id->ip, comment, org_id->name, zone_id->name
#Reconciliation Keys: name, ip_id (ip)
#Change tracking comment:
#Issues: 5
#Warnings: 0
#Created: 0
#Updated: 0
#Unchanged: 0
Line;Status;Object Class;Object Id;ip_id (IPv6 Address - ext key);org_id (Organization - ext key);zone_id (Zone - ext key);name (RR Name);overwrite_zone_ttl (Overwrite zone TTL);ttl (TTL);comment (Comment)
0;Issue: Internal error: MissingQueryArgument, Missing query argument: expecting = ip, available = {};n/a;n/a;n/a;n/a;n/a;host.myzone.com.;no;;
....

Csv file

name,overwrite_zone_ttl,ttl,ip_id->ip,comment,org_id->name,zone_id->name
host.myzone.com.,no,,2001:970:5c1c:401:0:0:0:20,,My Org,myzone.com.
....

Import procedure
php teemip/webservices/import.php --auth_user=xxxx--auth_pwd=xxxx--csvfile="myzone.com._AAAA.csv" --class="AAAARecord" --charset="UTF-8" --no_localize=1 --reconciliationkeys="name,ip_id->ip" --simulate=0 --output=details

@xtophe38
Copy link
Member

xtophe38 commented Apr 9, 2024

Definitely a bug ! Unfortunately, I won't be able to fix it as the correction must be made in iTop's heart, under the metamodel.class.php. I'll check with iTop dev's team to see what can be done and I'll keep you posted.

In the meantime, you may import your data using the advanced mode and directy refer to the IPv6 address key...

@samuelet
Copy link
Author

Unfortunately, using the advanced mode (via web portal) does not resolve. I get the same error. The only way i found is to manually create the AAA records.
Just only for completeness of information: exporting existing AAA records from web portal and re-importing them via CLI or Web obviously don't work with the same reported error .

@xtophe38
Copy link
Member

xtophe38 commented Apr 22, 2024

Well, yes, it works with the advanced mode.

You need to provide the ID / Key number of the IPv6 Address that the AAAA record should point to (what you can find in the URL of the presentation screen of the IP or by hovering the IP in a list), and map it to the field IPv6 Address.

Export / Import will work as well with the advanced mode as long as you export the ID of the IP address and use it to reimport.

@xtophe38
Copy link
Member

FYI, the bug reported here should be corrected in the next iTop 3.2 version.

@xtophe38
Copy link
Member

Bad news: finally, the bug has not been corrected by Combodo in the 3.2 release. I'll keep pushing to have it fixed in the next one.

@Hipska
Copy link

Hipska commented Aug 20, 2024

@xtophe38 maybe You can add a workaround/patch in TeemIP standalone version?

@xtophe38
Copy link
Member

Yep. I'll do it if it is not corrected in next iTop revision.

@xtophe38
Copy link
Member

Done: standalone TeemIp-3.2.1-2412 corrects the problem. Note that I don't have any clue, at this stage, if it will be corrected in iTop's next revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants