Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1374346

Summary: no GeoIP database installed which can answer queries of type 'city'
Product: Red Hat Enterprise Linux 7 Reporter: Petr Sklenar <psklenar>
Component: bindAssignee: Petr Menšík <pemensik>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: pemensik, thozza
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-04 21:21:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Sklenar 2016-09-08 13:20:02 UTC
Description of problem:
Options geoip city needs package GeoIP-data which is in optional channel.

if you follow bind knowledge base :
https://kb.isc.org/article/AA-01149/0/Using-the-GeoIP-Features-in-BIND-9.10.html
you would see all the options used.

There is strange location for this database with cities.


Version-Release number of selected component (if applicable):
bind-9.9.4-36.el7.x86_64
GeoIP-data-1.5.0-11.el7.noarch


How reproducible:
always

Steps to Reproduce:
1. have a bind + package GeoIP
2. 
use following options:

geoip-directory "/usr/share/GeoIP";
+
acl "US" {
  geoip country US;
  geoip region CA;
  geoip city A;
};

3. it fails with error message:
/etc/named.conf:56: no GeoIP database installed which can answer queries of type 'city'

4. look at files:

[0 root@qeos-103 ~]# rpm -ql GeoIP|grep -i city
/usr/share/GeoIP/GeoIPCity.dat
/usr/share/GeoIP/GeoIPCityv6.dat
/usr/share/doc/GeoIP-1.5.0/fetch-geoipdata-city.pl

#######
####### which is strange ^, for the first view I would say that I have DB with cities.
#######

5. but I haven't db with cities:
[0 root@qeos-103 ~]# ls -la /usr/share/GeoIP/GeoIPCity.dat
ls: cannot access /usr/share/GeoIP/GeoIPCity.dat: No such file or directory


6. yum install GeoIP-data -y

7. ls -la /usr/share/GeoIP/GeoIPCity.dat
lrwxrwxrwx. 1 root root 38 Sep  8 09:06 /usr/share/GeoIP/GeoIPCity.dat -> /usr/share/GeoIP/GeoIPCity-initial.dat

8. Now option 'geoip city' works fine


Actual results:
users can be messed:
A, Options 'geoip country' + 'region' works with base package GeoIP but for 'city' you need GeoIP-data.
B, Package GeoIP shows(rpm -ql) /usr/share/GeoIP/GeoIPCity.dat which is not on the disk.

Expected results:
document it or move GeoIP-data into base channel.

Additional info:

Comment 4 Petr Menšík 2020-01-07 16:26:21 UTC
Requirement for GeoIPCity, GeoIPCityv6, GeoIPASNum and GeoIPASNumv6 requires GeoIP-data package installed. There are symlinks pointing to non-existing file until GeoIP-data is installed.

There is already well documented enabling of optional channel [1], but details about named configuration to choose correct database are not yet documented. When any ACL would contain geoip city XY or geoip asnum XY, option channel GeoIP-data has to be installed. Otherwise, basic usage is documented by ISC KB [2].

1. https://access.redhat.com/solutions/392003
2. https://kb.isc.org/docs/aa-01149

Comment 8 Petr Menšík 2020-06-04 21:21:18 UTC
Original GeoIP article[1] was updated was updated to include option channel on RHEL7.

Separate article was created for RHEL8[2], not yet published. But not directly related to this bug. Closing this bug, no code changed would be done.

1. https://access.redhat.com/solutions/3307231
2. https://access.redhat.com/articles/5127051