<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pyphosphor, branch master</title>
<subtitle>OpenBMC Phosphor Python integration</subtitle>
<id>https://git.raptorcs.com/git/pyphosphor/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/pyphosphor/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/'/>
<updated>2018-08-21T16:17:59+00:00</updated>
<entry>
<title>sensors: Remove sensor manager</title>
<updated>2018-08-21T16:17:59+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-21T15:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=d2aadf1220b03580ab5f93fd15e068040cdb895b'/>
<id>urn:sha1:d2aadf1220b03580ab5f93fd15e068040cdb895b</id>
<content type='text'>
This sensor manager was in charge of creating the
/org/openbmc/sensors object and initializing them, but this path
is now deprecated and the sensors have moved to other paths
specified by the ipmi sensor config.yaml file in the
openbmc/openbmc repo. This sensor manager can now be removed.

Tested: Powered on a Witherspoon to the Host OS without ipmi
giving get/set sensor errors.

Change-Id: Id9f7626d84d49c62cdb48b5d75f4247ed5813b4c
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove PowerSupplyDeratingSensor</title>
<updated>2018-08-21T16:16:42+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-20T20:25:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=3856d7d1cb5622ecaa349f7273f8b33b85155a65'/>
<id>urn:sha1:3856d7d1cb5622ecaa349f7273f8b33b85155a65</id>
<content type='text'>
The PowerSupplyDerating Sensor is being added to the ipmi
sensor.yaml file since the /org/openbmc/sensors path is
being deprecated. Remove this sensor from the org path.

Tested: Powered on a Witherspoon to the Host OS without
sensor errors.

Change-Id: Ie6c4a0b649c374c323b87092895d319a98d7cede
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove PowerSupplyRedundancySensor</title>
<updated>2018-08-21T16:15:05+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-17T19:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=6c22a7656eb1ef51d0391713a953c15bbcdd3526'/>
<id>urn:sha1:6c22a7656eb1ef51d0391713a953c15bbcdd3526</id>
<content type='text'>
The PowerSupplyRedundancy Sensor is being added to the ipmi
sensor.yaml file since the /org/openbmc/sensors path is
being deprecated. Remove this sensor from the org path.

Tested: Powered on a Witherspoon to the Host OS without
sensor errors.

Change-Id: Ie5ad41e7723de67c665576d6a69210df82710869
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove TurboAllowedSensor</title>
<updated>2018-08-20T18:58:46+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-20T17:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=f63e191ca673a0acd7ab5c45272e1acf51bf7183'/>
<id>urn:sha1:f63e191ca673a0acd7ab5c45272e1acf51bf7183</id>
<content type='text'>
The TurboAllowed sensor is already mapped to
/xyz/openbmc_project/control/host0/turbo_allowed
(Reference: the phosphor-ipmi-sensor-inventory-mrw-config/config.yaml file).
Remove it from the deprecated /org/openbmc/sensors path.

Tested: Powered on a Witherspoon to the Host OS without errors.

Change-Id: Ic1df697756721305ab00b630e74f33160e24e522
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove BootCountSensor</title>
<updated>2018-08-08T19:50:09+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-08T19:19:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=18d6cdc17e30e9a5d6c6ed45467a27f5a12af210'/>
<id>urn:sha1:18d6cdc17e30e9a5d6c6ed45467a27f5a12af210</id>
<content type='text'>
The BootCountSensor has moved from the
/org/openbmc/sensors path to /xyz/openbmc_project/state/host0.
Remove it as it's deprecated.

Tested: Verified that the "AttemptsLeft" host property where
the BootSensor value now resides had the default value of 3
and was decremented when the Host didn't boot. Then on a
successful boot this value was set back to 3.

Change-Id: I87e2707abe7b052d4363bc583233780112200e4f
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove OperatingSystemStatusSensor</title>
<updated>2018-08-08T18:37:53+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-08T16:28:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=b6d977ae81c02f9511eb3b99427a79482657d33f'/>
<id>urn:sha1:b6d977ae81c02f9511eb3b99427a79482657d33f</id>
<content type='text'>
The OperatingSystemStatusSensor has moved from the
/org/openbmc/sensors path to /xyz/openbmc_project/state/host0
and its value in the org path is no longer being updated.
Remove this unused sensor class.

Tested: Powered on a Witherspoon to the Host OS.

Change-Id: I9cb50d999e475583fbdcf0443da73fe6b807f7bd
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>sensors: Remove BootProgressSensor</title>
<updated>2018-08-07T20:34:12+00:00</updated>
<author>
<name>Adriana Kobylak</name>
<email>anoo@us.ibm.com</email>
</author>
<published>2018-08-07T19:49:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=c8818021bc50f95f34b21755efca3b9232cf7e9b'/>
<id>urn:sha1:c8818021bc50f95f34b21755efca3b9232cf7e9b</id>
<content type='text'>
The boot progress sensor has moved from the
/org/openbmc/sensors path to /xyz/openbmc_project/state/host0.
(Reference: the phosphor-ipmi-sensor-inventory%/config.yaml files
under the openbmc/openbmc repository).

Remove the deprecated sensor class.

Tested: Verified Witherspoon powered on to the Host OS.

Change-Id: I46ae2a2c6b228759bcde77773f451e201bc40732
Signed-off-by: Adriana Kobylak &lt;anoo@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>Add MAINTAINERS file</title>
<updated>2018-05-18T16:57:20+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-18T16:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=216b518a3cf92f3b74ee2989874da49962c88f41'/>
<id>urn:sha1:216b518a3cf92f3b74ee2989874da49962c88f41</id>
<content type='text'>
Change-Id: I19e72796b1a84e1a5435ea63051c48e9488fc698
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>pathtree: Make dataitems() use the cache dict under restricted args</title>
<updated>2018-05-16T05:27:29+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-09T03:22:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=c31ae3b0b8cbe39f37ec1d14c2420b4fa3e4b43e'/>
<id>urn:sha1:c31ae3b0b8cbe39f37ec1d14c2420b4fa3e4b43e</id>
<content type='text'>
This achieves a 100x improvement in iteration time when the subtree
rooted at the root of the full tree and there is no depth limit (i.e.
the caller has requested all "populated" items). Whilst it sounds like a
restricted case, it is a very common query by way of phosphor-objmgr's
obmc/mapper/server.py:ObjectMapper.process_old_owner()

Note this is a quasi API break, as some keys that were previously
not present in the results may now appear: Explicitly storing 'None'
into the data structure will have the key with 'None' appear in the
full-tree dataitems() case. However, given this was filtered previously,
no existing callers should be storing 'None' into the tree as they would
not have been able to retrieve it via dataitems().

Before:
$ python -m obmc.utils.testpathtree
...
Iteration tests:
        depth=1, width=1, n=1000: 0.135853052139
        depth=1, width=2, n=1000: 0.203811883926
        depth=1, width=3, n=1000: 0.26814198494
        depth=1, width=4, n=1000: 0.333888053894
        depth=2, width=1, n=1000: 0.193987131119
        depth=2, width=2, n=1000: 0.264018058777
        depth=2, width=3, n=1000: 0.327262878418
        depth=2, width=4, n=1000: 0.38805603981
        depth=3, width=1, n=1000: 0.253651857376
        depth=3, width=2, n=1000: 0.317117929459
        depth=3, width=3, n=1000: 0.385557889938
        depth=3, width=4, n=1000: 0.452265024185
        depth=4, width=1, n=1000: 0.327889919281
        depth=4, width=2, n=1000: 0.390358924866
        depth=4, width=3, n=1000: 0.459683895111
        depth=4, width=4, n=1000: 0.530153989792

After:
$ python -m obmc.utils.testpathtree
...
Iteration tests:
        depth=1, width=1, n=1000: 0.0012412071228
        depth=1, width=2, n=1000: 0.00455403327942
        depth=1, width=3, n=1000: 0.00307989120483
        depth=1, width=4, n=1000: 0.00356507301331
        depth=2, width=1, n=1000: 0.00118088722229
        depth=2, width=2, n=1000: 0.00169396400452
        depth=2, width=3, n=1000: 0.00234699249268
        depth=2, width=4, n=1000: 0.00300288200378
        depth=3, width=1, n=1000: 0.00100708007812
        depth=3, width=2, n=1000: 0.00161695480347
        depth=3, width=3, n=1000: 0.00234794616699
        depth=3, width=4, n=1000: 0.00315403938293
        depth=4, width=1, n=1000: 0.00101804733276
        depth=4, width=2, n=1000: 0.00204801559448
        depth=4, width=3, n=1000: 0.00281095504761
        depth=4, width=4, n=1000: 0.0070219039917

Change-Id: Ice3afd12e2b112227735f0f1dedb6a8ea594740c
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
<entry>
<title>pathtree: Allow get() on subtrees</title>
<updated>2018-05-16T05:27:29+00:00</updated>
<author>
<name>Andrew Jeffery</name>
<email>andrew@aj.id.au</email>
</author>
<published>2018-05-16T04:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/pyphosphor/commit/?id=ce2a6f0354ed450ada2171e239ac1056b3df3126'/>
<id>urn:sha1:ce2a6f0354ed450ada2171e239ac1056b3df3126</id>
<content type='text'>
When running recent PathTree modifications on a BMC we can see failures
in the log such as "Failed to invoke ObjectMapper method" from the
phosphor-fru-fault-monitor. This can be triggered via the
openbmc-test-automation suite, for example with the following command

$ robot -v OPENBMC_HOST:w5.aus.stglabs.ibm.com --include \
	Create_Test_Error_Callout_And_Verify extended/test_association.robot

Capturing the DBus traffic across this test case
(`busctl capture &gt; dbus.pcap`) and analysing it with Wireshark showed the
following method invocation:

```
0000   6c 01 00 01 53 00 00 00 16 00 00 00 c6 00 00 00  l...S...........
0010   01 01 6f 00 22 00 00 00 2f 78 79 7a 2f 6f 70 65  ..o.".../xyz/ope
0020   6e 62 6d 63 5f 70 72 6f 6a 65 63 74 2f 6f 62 6a  nbmc_project/obj
0030   65 63 74 5f 6d 61 70 70 65 72 00 00 00 00 00 00  ect_mapper......
0040   03 01 73 00 09 00 00 00 47 65 74 4f 62 6a 65 63  ..s.....GetObjec
0050   74 00 00 00 00 00 00 00 02 01 73 00 20 00 00 00  t.........s. ...
0060   78 79 7a 2e 6f 70 65 6e 62 6d 63 5f 70 72 6f 6a  xyz.openbmc_proj
0070   65 63 74 2e 4f 62 6a 65 63 74 4d 61 70 70 65 72  ect.ObjectMapper
0080   00 00 00 00 00 00 00 00 06 01 73 00 20 00 00 00  ..........s. ...
0090   78 79 7a 2e 6f 70 65 6e 62 6d 63 5f 70 72 6f 6a  xyz.openbmc_proj
00a0   65 63 74 2e 4f 62 6a 65 63 74 4d 61 70 70 65 72  ect.ObjectMapper
00b0   00 00 00 00 00 00 00 00 08 01 67 00 03 73 61 73  ..........g..sas
00c0   00 00 00 00 00 00 00 00 07 01 73 00 05 00 00 00  ..........s.....
00d0   3a 31 2e 35 37 00 00 00 20 00 00 00 2f 78 79 7a  :1.57... .../xyz
00e0   2f 6f 70 65 6e 62 6d 63 5f 70 72 6f 6a 65 63 74  /openbmc_project
00f0   2f 6c 65 64 2f 67 72 6f 75 70 73 2f 00 00 00 00  /led/groups/....
0100   27 00 00 00 22 00 00 00 6f 72 67 2e 66 72 65 65  '..."...org.free
0110   64 65 73 6b 74 6f 70 2e 44 42 75 73 2e 4f 62 6a  desktop.DBus.Obj
0120   65 63 74 4d 61 6e 61 67 65 72 00                 ectManager.
```

and the response

```
0000   6c 03 01 01 3f 00 00 00 9d 08 00 00 5e 00 00 00  l...?.......^...
0010   06 01 73 00 05 00 00 00 3a 31 2e 35 37 00 00 00  ..s.....:1.57...
0020   04 01 73 00 27 00 00 00 6f 72 67 2e 66 72 65 65  ..s.'...org.free
0030   64 65 73 6b 74 6f 70 2e 44 42 75 73 2e 45 72 72  desktop.DBus.Err
0040   6f 72 2e 46 69 6c 65 4e 6f 74 46 6f 75 6e 64 00  or.FileNotFound.
0050   05 01 75 00 16 00 00 00 08 01 67 00 01 73 00 00  ..u.......g..s..
0060   07 01 73 00 05 00 00 00 3a 31 2e 31 35 00 00 00  ..s.....:1.15...
0070   3a 00 00 00 70 61 74 68 20 6f 72 20 6f 62 6a 65  :...path or obje
0080   63 74 20 6e 6f 74 20 66 6f 75 6e 64 3a 20 2f 78  ct not found: /x
0090   79 7a 2f 6f 70 65 6e 62 6d 63 5f 70 72 6f 6a 65  yz/openbmc_proje
00a0   63 74 2f 6c 65 64 2f 67 72 6f 75 70 73 2f 00     ct/led/groups/.
```

These packets translate to the following `busctl` invocation and response:

```
root@witherspoon:~# busctl call \
	xyz.openbmc_project.ObjectMapper \
	/xyz/openbmc_project/object_mapper \
	xyz.openbmc_project.ObjectMapper \
	GetObject sas \
		/xyz/openbmc_project/led/groups/ \
		1 \
		org.freedesktop.Dbus.ObjectManager
path or object not found: /xyz/openbmc_project/led/groups/
root@witherspoon:~#
```

From `busctl tree` we can see that the objects do actually appear on the
bus:

root@witherspoon:~# busctl tree
...
Service xyz.openbmc_project.LED.GroupManager:
└─/xyz
  └─/xyz/openbmc_project
    └─/xyz/openbmc_project/led
      └─/xyz/openbmc_project/led/groups
        ├─/xyz/openbmc_project/led/groups/bmc_booted
        ├─/xyz/openbmc_project/led/groups/bmc_fault
        ├─/xyz/openbmc_project/led/groups/boxelder_fault
        ├─/xyz/openbmc_project/led/groups/core0_fault
        ├─/xyz/openbmc_project/led/groups/core10_fault
...
```

However, the /xyz/openbmc_project/led/groups/ path represents a subtree
root, not a leaf element. I didn't realise this was a supported
use-case, and over-aggressively removed support for it in the recent
patch adding the flat dict cache.

Add in a fallback to iterating the PathTree datastructure when we take a
cache miss.

Change-Id: I658c3fdd6b87be9d814c59a654e63ec5bb83e2bd
Fixes: 52aeb314c0eb ("pathtree: Cache keys in a flat dict for fast lookup")
Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
</content>
</entry>
</feed>
