Bug 2016302

Summary: ganglia-web RPM requires php-xml implicitly
Product: [Fedora] Fedora EPEL Reporter: sstcosaka <sstcosaka01>
Component: gangliaAssignee: Terje Røsten <terje.rosten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: epel8CC: germano.massullo, isidro.gonzalez.caballero, jose.p.oliveira.oss, nick, terje.rosten
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ganglia-3.7.2-40.fc38 ganglia-3.7.2-40.el8 ganglia-3.7.2-40.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-22 02:31:46 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 sstcosaka 2021-10-21 08:50:10 UTC
Description of problem:
- This is a RPM dependency problem.
- ganglia-web requires php-xml but ganglia-web-3.7.5-33.el8.x86_64.rpm's "requires" section does not include it.

- Without php-xml,
  we get errors like below in webpage(http://serverIP/ganglia)
This page isn’t working 
10.181.113.150 is currently unable to handle this request.
HTTP ERROR 500
  and  we get errors like below in /var/log/php-fpm/www-error.log 
# tail -n 6 /var/log/php-fpm/www-error.log 
[21-Oct-2021 02:33:37 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/ganglia/ganglia.php:356
Stack trace:
#0 /usr/share/ganglia/get_ganglia.php(11): Gmetad('127.0.0.1', 8652)
#1 /usr/share/ganglia/index.php(7): include_once('/usr/share/gang...')
#2 {main}
  thrown in /usr/share/ganglia/ganglia.php on line 356

Version-Release number of selected component (if applicable):
ganglia-web-3.7.5-33.el8.x86_64.rpm

How reproducible:

Steps to Reproduce:
1. OS installation
install OS(RHEL8.4) from DVD
base enviromemnt is "Server" without any addtional package.

2  ganglia installation
dnf -y install php php-gd rrdtool apr libmemcached-libs
rpm -ivh ganglia-web-3.7.5-33.el8.x86_64.rpm ganglia-gmetad-3.7.2-33.el8.x86_64.rpm ganglia-3.7.2-33.el8.x86_64.rpm libconfuse-3.3-1.el8.x86_64.rpm ganglia-gmond-3.7.2-33.el8.x86_64.rpm

To use dnf easiry, we did like 
  https://access.redhat.com/solutions/3776721

3. settings
3.1  igonore firewall/selinux
firewall-cmd --zone=trusted  --change-interface=ens3 --permanent
setenforce 0


3.2   Edit /etc/httpd/conf.d/ganglia.conf to avoid forbidden problem
# diff /etc/httpd/conf.d/ganglia.conf{,.orig}
9c9
< #  Deny from all
---
>   Deny from all
13,14d12
<   Allow from all
<  Require all granted

3.3  ower change from ganglia to apache
chown -R apache:apache /usr/share/ganglia

3.4 start gmond/gmetad and restart httpd
service httpd start
service gmond start
service gmetad start
service httpd restart

Then we see
# tail -f /var/log/php-fpm/www-error.log 
[21-Oct-2021 08:12:43 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function xml_parser_create() in /usr/share/ganglia/ganglia.php:356
Stack trace:
#0 /usr/share/ganglia/get_ganglia.php(11): Gmetad('127.0.0.1', 8652)
#1 /usr/share/ganglia/index.php(7): include_once('/usr/share/gang...')
#2 {main}
  thrown in /usr/share/ganglia/ganglia.php on line 356

Actual results:
# rpm -qp -R ganglia-web-3.7.5-33.el8.x86_64.rpm 
warning: ganglia-web-3.7.5-33.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
/bin/bash
/bin/sh
config(ganglia-web) = 3.7.5-33.el8
ganglia-gmetad = 3.7.2-33.el8
php
php-gd
rpmlib(BuiltinLuaScripts) <= 4.2.2-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rrdtool


Expected results:
# rpm -qp -R ganglia-web-3.7.5-33.el8.x86_64.rpm 
warning: ganglia-web-3.7.5-33.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
/bin/bash
/bin/sh
config(ganglia-web) = 3.7.5-33.el8
ganglia-gmetad = 3.7.2-33.el8
php
php-gd
php-xml
rpmlib(BuiltinLuaScripts) <= 4.2.2-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rrdtool

Additional info:
even after installing php-xml,
we get 
There was an error collecting ganglia data (127.0.0.1:8652): fsockopen error: Permission denied
but this is another problem
, which is fixed with "setenforce 0"

Comment 1 sstcosaka 2021-10-22 05:42:52 UTC
- We tried similar thing with EPEL7 and RHEL7.9.
  ganglia-web-3.7.5-33.el7.x86_64.rpm does not require php-xml 
- It seems because 
  xml_parser_create was moved from libphp5.so to xml.so

((EPEL7 and RHEL7.9)) 
- Install DVD rpms
yum install libmemcached apr rrdtool php php-gd

- Install EPEL rpms
# rpm -ivh ganglia-3.7.2-33.el7.x86_64.rpm ganglia-gmond-3.7.2-33.el7.x86_64.rpm ganglia-gmetad-3.7.2-33.el7.x86_64.rpm ganglia-web-3.7.5-33.el7.x86_64.rpm libconfuse-2.7-7.el7.x86_64.rpm 

[root@nrhel7i06 202011el7]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)
[root@nrhel7i06 202011el7]# rpm -qa | grep php-xml
[root@nrhel7i06 202011el7]# yum search php-xml
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
=============================================================== N/S matched: php-xml ================================================================
php-xml.x86_64 : A module for PHP applications which use XML
php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol

  Name and summary matches only, use "search all" for everything.


((xml_parser_create was moved from libphp5.so to xml.so))
$ strings /usr/lib64/httpd/modules/libphp5.so | grep xml_parser_create
xml_parser_create
xml_parser_create_ns

[root@nrhel8i11 ~]# rpm -ql php | grep so 
/usr/lib64/httpd/modules/libphp7.so
[root@nrhel8i11 ~]# strings /usr/lib64/httpd/modules/libphp7.so | grep xml_parser_create 
[root@nrhel8i11 ~]# rpm -ql php-xml | grep so | xargs -i bash -c "echo {} ; strings {} | grep xml_parser_create" 
/usr/lib64/php/modules/dom.so
/usr/lib64/php/modules/simplexml.so
/usr/lib64/php/modules/wddx.so
/usr/lib64/php/modules/xml.so
xml_parser_create
xml_parser_create_ns
/usr/lib64/php/modules/xmlreader.so
/usr/lib64/php/modules/xmlwriter.so
/usr/lib64/php/modules/xsl.so

Comment 2 Fedora Update System 2023-01-12 17:41:54 UTC
FEDORA-2023-15c7979634 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-15c7979634

Comment 3 Fedora Update System 2023-01-12 17:44:53 UTC
FEDORA-2023-15c7979634 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2023-01-12 17:52:16 UTC
FEDORA-EPEL-2023-383fe230f3 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-383fe230f3

Comment 5 Fedora Update System 2023-01-12 17:52:17 UTC
FEDORA-EPEL-2023-73fabeeb85 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-73fabeeb85

Comment 6 Fedora Update System 2023-01-13 01:58:23 UTC
FEDORA-EPEL-2023-73fabeeb85 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-73fabeeb85

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-01-13 02:04:13 UTC
FEDORA-EPEL-2023-383fe230f3 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-383fe230f3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-01-22 02:31:46 UTC
FEDORA-EPEL-2023-73fabeeb85 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-01-22 03:03:20 UTC
FEDORA-EPEL-2023-383fe230f3 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.