BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/355788 )

Change subject: interface-rps: clean up typing/format-string issues
......................................................................

interface-rps: clean up typing/format-string issues

Change-Id: I23f76548b5681d60ec692a2ce661d2e6f75f27ca
---
M modules/interface/files/interface-rps.py
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/355788/1

diff --git a/modules/interface/files/interface-rps.py 
b/modules/interface/files/interface-rps.py
index 3ed3ef6..1affd20 100755
--- a/modules/interface/files/interface-rps.py
+++ b/modules/interface/files/interface-rps.py
@@ -103,7 +103,7 @@
     # filter-out HyperThreading siblings
     cores = []
     for cpu in cpus:
-        path_threads = os.path.join(path_cpu, 'cpu%s' % cpu,
+        path_threads = os.path.join(path_cpu, 'cpu%d' % cpu,
                                     'topology', 'thread_siblings_list')
         thread_siblings = get_value(path_threads).split(',')
         cores.append(int(thread_siblings[0]))
@@ -164,7 +164,7 @@
     for line in irq_file:
         match = rss_re.match(line)
         if match:
-            irqs[int(match.group(2))] = match.group(1)
+            irqs[int(match.group(2))] = int(match.group(1))
 
     # If we don't get an *exact* match for the rx_queues list, give up
     if len(irqs) != len(rx_queues):
@@ -185,15 +185,15 @@
     txt_bitmask = format(bitmask, 'x')
 
     if rx_irq:
-        irq_node = '/proc/irq/%s/smp_affinity' % rx_irq
+        irq_node = '/proc/irq/%d/smp_affinity' % rx_irq
         write_value(irq_node, txt_bitmask)
 
-    rx_node = '/sys/class/net/%s/queues/rx-%s/rps_cpus' % (device, rxq)
+    rx_node = '/sys/class/net/%s/queues/rx-%d/rps_cpus' % (device, rxq)
     write_value(rx_node, txt_bitmask)
 
     if txqs:
         for i in txqs:
-            tx_node = '/sys/class/net/%s/queues/tx-%s/xps_cpus' % (device, i)
+            tx_node = '/sys/class/net/%s/queues/tx-%d/xps_cpus' % (device, i)
             write_value(tx_node, txt_bitmask)
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/355788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23f76548b5681d60ec692a2ce661d2e6f75f27ca
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to