fix service port number lookup to use protocol
The existing code passes :proto, which string_to_port casts to a
string, gets "proto", compares that to the possibilities "udp" or "tcp",
and when neither, falls back to using "tcp".
This patch passes the actual proto value to the function, in case there is
a UDP specific service in your /etc/services (uncommon, but it happens).
It looks like Puppet will evaluate the properties in declared order,
so I had to move newproperty(:proto) up so @resource[:proto] was
available in the code for sport, dport and port.
firewall is a type
that may have no external impact to Forge modules.
This module is declared in 105 of 578 indexed public Puppetfiles.
These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.
Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.
Hrm, looks like the test case "'040 partial invert" needs adjustment? It now bombs since "http/udp" does not exist in the test harness (it does exist on my Fedora!). This error was hidden earlier since it looked up "http/tcp".
This PR has been marked as stale because it has been open for a while and has had no recent activity. If this PR is still important to you please drop a comment below and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.
This bug is still relevant, and the patch still applies cleanly.
Hi @kjetilho, thanks for letting us know. We are using the stale-bot as a tool to sort our current PRs and figure out which ones are relevant and which ones might be outdated. We will be putting your PR into the active column and, hopefully, we will be able to review it soon. Thanks for your patience.
Closing and opening to re-kick automated testing.
firewall is a type
Breaking changes to this file WILL impact these 121 modules (exact match):
- echoes-echoes_firewall
- binarin-binarin
- gnubilafrance-nfs
- abiquo-abiquo
- sat6qe-katellovirt
- tomkrieger-security_baseline
- karume-openstack
- narasimhasv-openstack
- andrewkroh-base_firewall
- openstack-pacemaker
- aco-tomcat
- puppetfinland-packetfilter
- puppetlabs-openstack
- hesco-weave
- thias-rhel
- geoffwilliams-r_profile
- jmkeyes-gocd
- mvasilenko-gocd
- dhollinger-devopsdays
- compass-rserve
- jgazeley-monyog
- eelcomaljaars-friendica
- radez-pacemaker
- jgazeley-speedtest
- myoung34-mirthconnect
- gabe-pe_razor_complete
- compass-examdb
- inkling-postgresql
- thoherr-railsapp
- jlambert121-puppet
- sjoeboo-puppet
- myoung34-marklogic
- maxchk-varnish
- 42ways-railsapp
- wdec-echoes_monit
- wdec-monit
- echoes-monit
- rendhalver-nrpe
- abstractit-nrpe
- tufin-secureapp
- evenup-riakdev
- fraenki-galera
- godp1301-postgresql
- alexharvey-firewall_multi
- soli-monit
- puppet-cassandra
- themeier-ssh
- enterprisemodules-ora_profile
- evenup-puppet
- pennycoders-marathon
- pennycoders-zookeeper
- olevole-ssh
- ghoneycutt-ssh
- locp-cassandra
- Nextdoor-strongswan
- glarizza-profiles
- pltraining-selfpaced
- jgazeley-networker
- myoung34-hbase
- danfoster-networker
- mdelaney-icecc
- puppetlabs-awsdemo_profiles
- jgazeley-ekahau_throughput_server
- eschiller-trac
- compass-learninglocker
- mtsinc1-trac
- jonnyx-samba
- glorpen-g_firewall
- pmuller-aws_firewall
- jethrocarr-timemachine
- evenup-common
- calmenergy-fail2ban
- CERNOps-bdii
- cnafsd-bdii
- ploperations-haproxy_consul
- olevole-memcached
- puppetfinland-puppetmaster
- jgazeley-freeradius
- pennycoders-mesos
- puppetlabs-puppetdb
- puppetlabs-wordpress_app
- cloudscaling-scaleio
- saz-memcached
- SchnWalter-happydev
- wazuh-wazuh
- echoes-strongswan
- dhogland-splunk
- bashtoni-masq
- jethrocarr-roadwarrior
- tedivm-psad
- treydock-perfsonar
- enterprisemodules-ora_rac
- treydock-slurm
- puppet-zabbix
- maany-simple_grid
- wdijkerman-zabbix
- danfoster-sitefirewall
- maxadamo-zfs_nas
- jgazeley-nagios
- maxadamo-tiny_nas
- jamesread-commonlinuxstuff
- treydock-globus
- railsdog-awsfirewall
- rogierslag-openswan
- oris-appserver
- huit-ipa
- mikegleasonjr-server
- tscopp-jss
- stesie-gluon
- tracywebtech-dofirewall
- maxadamo-galera_maxscale
- tomkrieger-remediate_install
- shearn89-toughen
- seteam-role
- puppetlabs-pam_firewall
- ffquintella-firewallmanager
- emccode-scaleio
- praekeltfoundation-docker_firewall
- treydock-gpfs
- maxadamo-galera_proxysql
- treydock-osg
Breaking changes to this file MAY impact these 145 modules (near match):
- seteam-profile
- counsyl-sys
- dbsrinivasulu-mediawiki
- gsachar1-mediawiki
- abhaysoni-mediawiki
- parthitraining-mediawiki
- hemantgangwar-mediawiki
- anthomas-mediawiki
- funaccount-mediawiki
- sunilh-mediawiki
- nitish741-mediawiki
- webserve-mediawiki
- narenv-mediawiki
- dharknes-scst
- raviforge-mediawiki
- suvarnagodri-mediawiki
- kiranhosamani-mediawiki
- pbhutani-mediawiki
- manish1984-mediawiki
- 214310-mediawiki
- hegdec-mediawiki
- mithilas-mediawiki
- shantanumalik-mediawiki
- pia-mediawiki
- vinaycharles-mediawiki
- prakash007-mediawiki
- byjupv-mediakwiki
- niksv-mediawiki
- preethi-mediawiki
- jaysingh-mediawiki
- ravishankar1jan-mediawiki
- jmkeyes-bind
- gardouille-proxmox
- counsyl-redis
- counsyl-memcached
- sathieu-c_icap
- mmack-cfssl
- vshn-uhosting
- netmanagers-dnsmasq
- netmanagers-nut
- maestrodev-avahi
- puppetfinland-monit
- rehan-cfssl
- rtyler-jenkins
- neillturner-teamcity
- rehan-samba
- puppet-jenkins
- fuzeman-bind
- example42-tftp
- example42-orientdb
- example42-redis
- example42-openntpd
- example42-xinetd
- netmanagers-bind
- example42-monit
- example42-mysql
- example42-nginx
- concrete-nagios
- rehan-nginx
- Azcender-profile
- echoes-wrappers
- soli-wrappers
- example42-libvirt
- example42-openssh
- example42-jenkins
- example42-proftpd
- example42-newrelic
- example42-freeradius
- example42-sendmail
- example42-heartbeat
- example42-lighttpd
- example42-vagrant
- example42-rsync
- example42-munin
- example42-rhcs
- example42-sysklogd
- example42-jboss
- example42-multipath
- example42-clvm
- example42-puppetdashboard
- example42-autofs
- example42-vsftpd
- example42-splunk
- example42-foreman
- example42-mcollective
- example42-snmpd
- example42-nfs
- example42-ntp
- example42-graylog2
- example42-samba
- example42-dhcpd
- example42-logstash
- example42-exim
- example42-rsyslog
- example42-nrpe
- example42-postgresql
- example42-elasticsearch
- example42-activemq
- example42-postfix
- example42-tomcat
- esakazmi-mediawiki
- gururaj-mediawiki
- jethrocarr-unifi_controller
- intelliment-itlm
- jgazeley-iperf
- puppetfinland-gitdaemon
- example42-psick
- devopera-docommon
- jethrocarr-unifi_video
- puppetfinland-tinyproxy
- puppetfinland-ntp
- puppetfinland-aptcacherng
- puppetfinland-webserver
- puppetfinland-postfix
- puppetfinland-easy_ipa
- puppetfinland-sshd
- HEPPuppet-htcondor
- puppetfinland-mysql
- puppetfinland-snmpd
- puppet-smokeping
- example42-tinc
- example42-resolver
- example42-dovecot
- example42-puppetdb
- example42-puppet
- example42-apache
- tedivm-hieratic
- netmanagers-bareos
- netmanagers-bacula
- example42-openvpn
- CERNOps-fts
- lcgdm-voms
- puppetfinland-znc
- tykeal-gerrit
- puppetfinland-dirsrv
- puppetfinland-buildbot
- puppetfinland-bacula
- openstack-tripleo
- hemantgangwar-firewallcustom
- tscopp-bigfix
- puppetfinland-openvpn
- maestrodev-maestro_nodes
- camptocamp-pacemaker
- infnpd-creamce
- autostructure-secure_linux_cis
This module is declared in 107 of 579 indexed public Puppetfiles.
These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.
Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.
Hi @kjetilho, there seems to be a spec test that is failing currently on your PR. The log is pointing at the following file:
rspec ./spec/unit/puppet/provider/iptables_spec.rb:340 # iptables provider when inverting rules fails when not all array items are inverted
Can you investigate this issue and (if related to your PR) make the necessary changes for the test to pass?
@kjetilho Any movement on this?
yep, I can reproduce when testing locally. will fix soon. thanks!
@kjetilho Thanks for this - can you rebase with the current main so we can proceed.
not sure if you are notified when I push a rebase, so adding a comment: "sure!" :)