ansible-junos-stdlib
ansible-junos-stdlib copied to clipboard
juniper.device.ping fails to handle when traffic-loss values are of type float - msg: 'Packet loss 33.3333 not an integer
Issue Type
- Bug Report
Module Name
juniper.device.ping
OS / Environment
JUNOS Evolved
Summary
juniper.device.ping does not handle when packet loss has float values .
msg: 'Packet loss 33.3333 not an integer. Response: b''
Steps to reproduce
- name: Test reachability to device using do-not-fragment and rapid
juniper.device.ping:
dest: x.x.x.x
do_not_fragment: false
rapid: true
size: 64
count: 3
acceptable_percent_loss: 30
ignore_errors: true
register: test_ping
TASK [Test reachability to device using do-not-fragment and rapid] ********************************************************************************************************
fatal: [10.220.24.28]: FAILED! => changed=false
acceptable_percent_loss: '30'
count: '3'
dest: x.x.x.x
dest_ip: x.x.x.x
do_not_fragment: false
host: x.x.x.x
interface: null
msg: 'Packet loss 33.3333 not an integer. Response: b''<ping-results>\n <target-host>x.x.x.x</target-host>\n <target-ip>x.x.x.x</target-ip>\n <packet-size>64</packet-size>\n <probe-results-summary>\n <probes-sent>3</probes-sent>\n <responses-received>2</responses-received>\n <packet-loss>33.3333</packet-loss>\n <rtt-minimum>33</rtt-minimum>\n <rtt-maximum>146</rtt-maximum>\n <rtt-average>89</rtt-average>\n <rtt-stddev>56</rtt-stddev>\n </probe-results-summary>\n <ping-success/>\n</ping-results>\n'''
packet_loss: '33.3333'
packets_received: '2'
packets_sent: '3'
rapid: true
routing_instance: null
size: '64'
source: null
source_ip: null
timeout: '120'
ttl: null
...ignoring