Saqib Khan | 7254f0e | 2017-04-10 21:45:37 -0500 | [diff] [blame] | 1 | #include <string> |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 2 | #include <experimental/filesystem> |
Saqib Khan | 7254f0e | 2017-04-10 21:45:37 -0500 | [diff] [blame] | 3 | #include <fstream> |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 4 | #include <queue> |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 5 | #include <phosphor-logging/elog-errors.hpp> |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 6 | #include <phosphor-logging/log.hpp> |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 7 | #include "xyz/openbmc_project/Common/error.hpp" |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 8 | #include <xyz/openbmc_project/Software/Version/server.hpp> |
Saqib Khan | 167601b | 2017-06-18 23:33:46 -0500 | [diff] [blame] | 9 | #include "version.hpp" |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 10 | #include "config.h" |
| 11 | #include "item_updater.hpp" |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 12 | #include "activation.hpp" |
Michael Tritz | 60bc20f | 2017-07-29 23:32:21 -0500 | [diff] [blame] | 13 | #include "serialize.hpp" |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 14 | |
| 15 | namespace openpower |
| 16 | { |
| 17 | namespace software |
| 18 | { |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame] | 19 | namespace updater |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 20 | { |
| 21 | |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 22 | // When you see server:: you know we're referencing our base class |
| 23 | namespace server = sdbusplus::xyz::openbmc_project::Software::server; |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 24 | namespace fs = std::experimental::filesystem; |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 25 | |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 26 | using namespace sdbusplus::xyz::openbmc_project::Common::Error; |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 27 | using namespace phosphor::logging; |
| 28 | |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 29 | constexpr auto squashFSImage = "pnor.xz.squashfs"; |
| 30 | |
Michael Tritz | b541f1b | 2017-10-15 15:10:21 -0500 | [diff] [blame] | 31 | // TODO: Change paths once openbmc/openbmc#1663 is completed. |
| 32 | constexpr auto MBOXD_INTERFACE = "org.openbmc.mboxd"; |
| 33 | constexpr auto MBOXD_PATH = "/org/openbmc/mboxd"; |
| 34 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 35 | void ItemUpdater::createActivation(sdbusplus::message::message& m) |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 36 | { |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 37 | using SVersion = server::Version; |
| 38 | using VersionPurpose = SVersion::VersionPurpose; |
| 39 | namespace msg = sdbusplus::message; |
| 40 | namespace variant_ns = msg::variant_ns; |
| 41 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 42 | sdbusplus::message::object_path objPath; |
| 43 | std::map<std::string, |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 44 | std::map<std::string, msg::variant<std::string>>> interfaces; |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 45 | m.read(objPath, interfaces); |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 46 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 47 | std::string path(std::move(objPath)); |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 48 | std::string filePath; |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 49 | auto purpose = VersionPurpose::Unknown; |
Saqib Khan | ce14870 | 2017-06-11 12:01:58 -0500 | [diff] [blame] | 50 | std::string version; |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 51 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 52 | for (const auto& intf : interfaces) |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 53 | { |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 54 | if (intf.first == VERSION_IFACE) |
| 55 | { |
| 56 | for (const auto& property : intf.second) |
| 57 | { |
| 58 | if (property.first == "Purpose") |
| 59 | { |
| 60 | // Only process the Host and System images |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 61 | auto value = SVersion::convertVersionPurposeFromString( |
| 62 | variant_ns::get<std::string>(property.second)); |
| 63 | |
| 64 | if (value == VersionPurpose::Host || |
| 65 | value == VersionPurpose::System) |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 66 | { |
Saqib Khan | ce14870 | 2017-06-11 12:01:58 -0500 | [diff] [blame] | 67 | purpose = value; |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 68 | } |
| 69 | } |
Saqib Khan | ce14870 | 2017-06-11 12:01:58 -0500 | [diff] [blame] | 70 | else if (property.first == "Version") |
| 71 | { |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 72 | version = variant_ns::get<std::string>(property.second); |
Saqib Khan | ce14870 | 2017-06-11 12:01:58 -0500 | [diff] [blame] | 73 | } |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 74 | } |
| 75 | } |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 76 | else if (intf.first == FILEPATH_IFACE) |
| 77 | { |
| 78 | for (const auto& property : intf.second) |
| 79 | { |
| 80 | if (property.first == "Path") |
| 81 | { |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 82 | filePath = variant_ns::get<std::string>(property.second); |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 83 | } |
| 84 | } |
| 85 | } |
| 86 | } |
Patrick Williams | e429094 | 2017-06-16 05:43:08 -0500 | [diff] [blame] | 87 | if ((filePath.empty()) || (purpose == VersionPurpose::Unknown)) |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 88 | { |
| 89 | return; |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 90 | } |
| 91 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 92 | // Version id is the last item in the path |
| 93 | auto pos = path.rfind("/"); |
| 94 | if (pos == std::string::npos) |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 95 | { |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 96 | log<level::ERR>("No version id found in object path", |
| 97 | entry("OBJPATH=%s", path)); |
| 98 | return; |
| 99 | } |
| 100 | |
| 101 | auto versionId = path.substr(pos + 1); |
| 102 | |
| 103 | if (activations.find(versionId) == activations.end()) |
| 104 | { |
| 105 | // Determine the Activation state by processing the given image dir. |
| 106 | auto activationState = server::Activation::Activations::Invalid; |
Gunnar Mills | 3588acc | 2017-09-07 13:13:22 -0500 | [diff] [blame] | 107 | AssociationList associations = {}; |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 108 | if (ItemUpdater::validateSquashFSImage(filePath) == 0) |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 109 | { |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 110 | activationState = server::Activation::Activations::Ready; |
Gunnar Mills | 3588acc | 2017-09-07 13:13:22 -0500 | [diff] [blame] | 111 | // Create an association to the host inventory item |
| 112 | associations.emplace_back(std::make_tuple( |
| 113 | ACTIVATION_FWD_ASSOCIATION, |
| 114 | ACTIVATION_REV_ASSOCIATION, |
| 115 | HOST_INVENTORY_PATH)); |
Adriana Kobylak | b66ac3a | 2017-03-28 13:33:20 -0500 | [diff] [blame] | 116 | } |
| 117 | |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 118 | fs::path manifestPath(filePath); |
| 119 | manifestPath /= MANIFEST_FILE; |
Saqib Khan | 167601b | 2017-06-18 23:33:46 -0500 | [diff] [blame] | 120 | std::string extendedVersion = (Version::getValue(manifestPath.string(), |
| 121 | std::map<std::string, std::string> |
| 122 | {{"extended_version", ""}})).begin()->second; |
Gunnar Mills | 3edb84b | 2017-08-18 15:13:15 -0500 | [diff] [blame] | 123 | |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 124 | activations.insert(std::make_pair( |
| 125 | versionId, |
| 126 | std::make_unique<Activation>( |
| 127 | bus, |
| 128 | path, |
Saqib Khan | 81bac88 | 2017-06-08 12:17:01 -0500 | [diff] [blame] | 129 | *this, |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 130 | versionId, |
| 131 | extendedVersion, |
Gunnar Mills | 3edb84b | 2017-08-18 15:13:15 -0500 | [diff] [blame] | 132 | activationState, |
| 133 | associations))); |
Michael Tritz | 5b75651 | 2017-10-06 16:52:01 -0500 | [diff] [blame] | 134 | |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 135 | auto versionPtr = std::make_unique<Version>( |
| 136 | bus, |
| 137 | path, |
| 138 | *this, |
| 139 | versionId, |
| 140 | version, |
| 141 | purpose, |
| 142 | filePath, |
| 143 | std::bind(&ItemUpdater::erase, |
| 144 | this, |
| 145 | std::placeholders::_1)); |
| 146 | versionPtr->deleteObject = |
| 147 | std::make_unique<Delete>(bus, path, *versionPtr); |
| 148 | versions.insert(std::make_pair(versionId, std::move(versionPtr))); |
Saqib Khan | 00044f4 | 2017-07-10 17:24:43 -0500 | [diff] [blame] | 149 | } |
Patrick Williams | 3accb32 | 2017-05-30 16:29:52 -0500 | [diff] [blame] | 150 | return; |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 151 | } |
| 152 | |
Saqib Khan | 167601b | 2017-06-18 23:33:46 -0500 | [diff] [blame] | 153 | void ItemUpdater::processPNORImage() |
Saqib Khan | 7254f0e | 2017-04-10 21:45:37 -0500 | [diff] [blame] | 154 | { |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 155 | // Read pnor.toc from folders under /media/ |
| 156 | // to get Active Software Versions. |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 157 | for (const auto& iter : fs::directory_iterator(MEDIA_DIR)) |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 158 | { |
| 159 | auto activationState = server::Activation::Activations::Active; |
| 160 | |
| 161 | static const auto PNOR_RO_PREFIX_LEN = strlen(PNOR_RO_PREFIX); |
Saqib Khan | 2be9ba9 | 2017-09-26 22:44:10 -0500 | [diff] [blame] | 162 | static const auto PNOR_RW_PREFIX_LEN = strlen(PNOR_RW_PREFIX); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 163 | |
| 164 | // Check if the PNOR_RO_PREFIX is the prefix of the iter.path |
| 165 | if (0 == iter.path().native().compare(0, PNOR_RO_PREFIX_LEN, |
| 166 | PNOR_RO_PREFIX)) |
| 167 | { |
Saqib Khan | 6a52226 | 2017-09-26 12:02:50 -0500 | [diff] [blame] | 168 | // The versionId is extracted from the path |
| 169 | // for example /media/pnor-ro-2a1022fe. |
| 170 | auto id = iter.path().native().substr(PNOR_RO_PREFIX_LEN); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 171 | auto pnorTOC = iter.path() / PNOR_TOC_FILE; |
| 172 | if (!fs::is_regular_file(pnorTOC)) |
| 173 | { |
Gunnar Mills | 850d5f6 | 2017-10-19 17:04:38 -0500 | [diff] [blame] | 174 | log<level::ERR>("Failed to read pnorTOC.", |
| 175 | entry("FILENAME=%s", pnorTOC.string())); |
Saqib Khan | 6a52226 | 2017-09-26 12:02:50 -0500 | [diff] [blame] | 176 | ItemUpdater::erase(id); |
| 177 | continue; |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 178 | } |
| 179 | auto keyValues = |
| 180 | Version::getValue(pnorTOC, |
| 181 | {{ "version", "" }, |
| 182 | { "extended_version", "" } }); |
| 183 | auto& version = keyValues.at("version"); |
| 184 | if (version.empty()) |
| 185 | { |
| 186 | log<level::ERR>("Failed to read version from pnorTOC", |
| 187 | entry("FILENAME=%s", pnorTOC.string())); |
| 188 | activationState = server::Activation::Activations::Invalid; |
| 189 | } |
| 190 | |
| 191 | auto& extendedVersion = keyValues.at("extended_version"); |
| 192 | if (extendedVersion.empty()) |
| 193 | { |
| 194 | log<level::ERR>("Failed to read extendedVersion from pnorTOC", |
| 195 | entry("FILENAME=%s", pnorTOC.string())); |
| 196 | activationState = server::Activation::Activations::Invalid; |
| 197 | } |
| 198 | |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 199 | auto purpose = server::Version::VersionPurpose::Host; |
| 200 | auto path = fs::path(SOFTWARE_OBJPATH) / id; |
Gunnar Mills | 3588acc | 2017-09-07 13:13:22 -0500 | [diff] [blame] | 201 | AssociationList associations = {}; |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 202 | |
Gunnar Mills | 3588acc | 2017-09-07 13:13:22 -0500 | [diff] [blame] | 203 | if (activationState == server::Activation::Activations::Active) |
| 204 | { |
| 205 | // Create an association to the host inventory item |
| 206 | associations.emplace_back(std::make_tuple( |
| 207 | ACTIVATION_FWD_ASSOCIATION, |
| 208 | ACTIVATION_REV_ASSOCIATION, |
| 209 | HOST_INVENTORY_PATH)); |
Gunnar Mills | 3edb84b | 2017-08-18 15:13:15 -0500 | [diff] [blame] | 210 | |
Gunnar Mills | 3588acc | 2017-09-07 13:13:22 -0500 | [diff] [blame] | 211 | // Create an active association since this image is active |
| 212 | createActiveAssociation(path); |
| 213 | } |
Gunnar Mills | 3edb84b | 2017-08-18 15:13:15 -0500 | [diff] [blame] | 214 | |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 215 | // Create Activation instance for this version. |
| 216 | activations.insert(std::make_pair( |
| 217 | id, |
| 218 | std::make_unique<Activation>( |
| 219 | bus, |
| 220 | path, |
| 221 | *this, |
| 222 | id, |
| 223 | extendedVersion, |
Gunnar Mills | 3edb84b | 2017-08-18 15:13:15 -0500 | [diff] [blame] | 224 | activationState, |
| 225 | associations))); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 226 | |
| 227 | // If Active, create RedundancyPriority instance for this version. |
| 228 | if (activationState == server::Activation::Activations::Active) |
| 229 | { |
Michael Tritz | 3641792 | 2017-08-04 14:00:29 -0500 | [diff] [blame] | 230 | uint8_t priority = std::numeric_limits<uint8_t>::max(); |
| 231 | if (!restoreFromFile(id, priority)) |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 232 | { |
Michael Tritz | 3641792 | 2017-08-04 14:00:29 -0500 | [diff] [blame] | 233 | log<level::ERR>("Unable to restore priority from file.", |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 234 | entry("VERSIONID=%s", id)); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 235 | } |
Michael Tritz | 3641792 | 2017-08-04 14:00:29 -0500 | [diff] [blame] | 236 | activations.find(id)->second->redundancyPriority = |
| 237 | std::make_unique<RedundancyPriority>( |
| 238 | bus, |
| 239 | path, |
| 240 | *(activations.find(id)->second), |
| 241 | priority); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 242 | } |
| 243 | |
| 244 | // Create Version instance for this version. |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 245 | auto versionPtr = std::make_unique<Version>( |
| 246 | bus, |
| 247 | path, |
| 248 | *this, |
| 249 | id, |
| 250 | version, |
| 251 | purpose, |
| 252 | "", |
| 253 | std::bind(&ItemUpdater::erase, |
| 254 | this, |
| 255 | std::placeholders::_1)); |
| 256 | versionPtr->deleteObject = |
| 257 | std::make_unique<Delete>(bus, path, *versionPtr); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 258 | versions.insert(std::make_pair( |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 259 | id, |
| 260 | std::move(versionPtr))); |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 261 | } |
Saqib Khan | 2be9ba9 | 2017-09-26 22:44:10 -0500 | [diff] [blame] | 262 | else if (0 == iter.path().native().compare(0, PNOR_RW_PREFIX_LEN, |
| 263 | PNOR_RW_PREFIX)) |
| 264 | { |
| 265 | auto id = iter.path().native().substr(PNOR_RW_PREFIX_LEN); |
| 266 | auto roDir = PNOR_RO_PREFIX + id; |
| 267 | if (!fs::is_directory(roDir)) |
| 268 | { |
| 269 | log<level::ERR>("No corresponding read-only volume found.", |
| 270 | entry("DIRNAME=%s", roDir)); |
| 271 | ItemUpdater::erase(id); |
| 272 | } |
| 273 | } |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 274 | } |
Gunnar Mills | 2badd7a | 2017-09-20 12:51:28 -0500 | [diff] [blame] | 275 | |
| 276 | // Look at the RO symlink to determine if there is a functional image |
| 277 | auto id = determineId(PNOR_RO_ACTIVE_PATH); |
| 278 | if (!id.empty()) |
| 279 | { |
| 280 | updateFunctionalAssociation(std::string{SOFTWARE_OBJPATH} + '/' + id); |
| 281 | } |
Saqib Khan | 167601b | 2017-06-18 23:33:46 -0500 | [diff] [blame] | 282 | return; |
Saqib Khan | 7254f0e | 2017-04-10 21:45:37 -0500 | [diff] [blame] | 283 | } |
| 284 | |
Adriana Kobylak | 5ba6b10 | 2017-05-19 09:41:27 -0500 | [diff] [blame] | 285 | int ItemUpdater::validateSquashFSImage(const std::string& filePath) |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 286 | { |
Saqib Khan | 4c5d744 | 2017-07-18 00:43:52 -0500 | [diff] [blame] | 287 | auto file = fs::path(filePath) / squashFSImage; |
| 288 | if (fs::is_regular_file(file)) |
Saqib Khan | a8ade7e | 2017-04-12 10:27:56 -0500 | [diff] [blame] | 289 | { |
| 290 | return 0; |
| 291 | } |
| 292 | else |
| 293 | { |
| 294 | log<level::ERR>("Failed to find the SquashFS image."); |
| 295 | return -1; |
| 296 | } |
| 297 | } |
| 298 | |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 299 | void ItemUpdater::removeReadOnlyPartition(std::string versionId) |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 300 | { |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 301 | auto serviceFile = "obmc-flash-bios-ubiumount-ro@" + versionId + |
| 302 | ".service"; |
| 303 | |
| 304 | // Remove the read-only partitions. |
| 305 | auto method = bus.new_method_call( |
| 306 | SYSTEMD_BUSNAME, |
| 307 | SYSTEMD_PATH, |
| 308 | SYSTEMD_INTERFACE, |
| 309 | "StartUnit"); |
| 310 | method.append(serviceFile, "replace"); |
| 311 | bus.call_noreply(method); |
| 312 | } |
| 313 | |
| 314 | void ItemUpdater::removeReadWritePartition(std::string versionId) |
| 315 | { |
| 316 | auto serviceFile = "obmc-flash-bios-ubiumount-rw@" + versionId + |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 317 | ".service"; |
| 318 | |
| 319 | // Remove the read-write partitions. |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 320 | auto method = bus.new_method_call( |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 321 | SYSTEMD_BUSNAME, |
| 322 | SYSTEMD_PATH, |
| 323 | SYSTEMD_INTERFACE, |
| 324 | "StartUnit"); |
| 325 | method.append(serviceFile, "replace"); |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 326 | bus.call_noreply(method); |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 327 | } |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 328 | |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 329 | void ItemUpdater::reset() |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 330 | { |
Michael Tritz | bb31f02 | 2017-11-22 11:51:29 -0600 | [diff] [blame] | 331 | constexpr static auto patchDir = "/usr/local/share/pnor"; |
| 332 | if (fs::is_directory(patchDir)) |
| 333 | { |
| 334 | for (const auto& iter : fs::directory_iterator(patchDir)) |
| 335 | { |
| 336 | fs::remove_all(iter); |
| 337 | } |
| 338 | } |
| 339 | |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 340 | for (const auto& it : activations) |
| 341 | { |
| 342 | auto serviceFile = "obmc-flash-bios-ubiclear@pnor-rw-" + it.first + |
| 343 | ".service"; |
| 344 | |
| 345 | // Clear the read-write partitions. |
| 346 | auto method = bus.new_method_call( |
| 347 | SYSTEMD_BUSNAME, |
| 348 | SYSTEMD_PATH, |
| 349 | SYSTEMD_INTERFACE, |
| 350 | "StartUnit"); |
| 351 | method.append(serviceFile, "replace"); |
| 352 | auto reply = bus.call(method); |
| 353 | |
| 354 | if (reply.is_method_error()) |
| 355 | { |
Marri Devender Rao | 795d984 | 2017-11-07 22:52:07 -0600 | [diff] [blame] | 356 | log<level::ERR>("Failed to clear read-write partitions", |
| 357 | entry("SERVICE_FILE=%s", serviceFile)); |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 358 | elog<InternalFailure>(); |
| 359 | } |
| 360 | |
| 361 | removeFile(it.first); |
| 362 | } |
Marri Devender Rao | 795d984 | 2017-11-07 22:52:07 -0600 | [diff] [blame] | 363 | static constexpr auto serviceFile = |
| 364 | "obmc-flash-bios-ubiclear@pnor-prsv.service"; |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 365 | // Clear the preserved partition. |
Adriana Kobylak | d6a549e | 2017-05-10 16:23:01 -0500 | [diff] [blame] | 366 | auto method = bus.new_method_call( |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 367 | SYSTEMD_BUSNAME, |
| 368 | SYSTEMD_PATH, |
| 369 | SYSTEMD_INTERFACE, |
| 370 | "StartUnit"); |
Marri Devender Rao | 795d984 | 2017-11-07 22:52:07 -0600 | [diff] [blame] | 371 | method.append(serviceFile, "replace"); |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 372 | auto reply = bus.call(method); |
Michael Tritz | dd961b6 | 2017-05-17 14:07:03 -0500 | [diff] [blame] | 373 | |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 374 | if (reply.is_method_error()) |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 375 | { |
Marri Devender Rao | 795d984 | 2017-11-07 22:52:07 -0600 | [diff] [blame] | 376 | log<level::ERR>("Failed to clear preserved partition", |
| 377 | entry("SERVICE_FILE=%s", serviceFile)); |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 378 | elog<InternalFailure>(); |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 379 | } |
Michael Tritz | fa7aa12 | 2017-09-22 15:16:11 -0500 | [diff] [blame] | 380 | |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 381 | return; |
| 382 | } |
| 383 | |
Michael Tritz | 5b75651 | 2017-10-06 16:52:01 -0500 | [diff] [blame] | 384 | bool ItemUpdater::isVersionFunctional(const std::string& versionId) |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 385 | { |
| 386 | if (!fs::exists(PNOR_RO_ACTIVE_PATH)) |
| 387 | { |
| 388 | return false; |
| 389 | } |
| 390 | |
| 391 | fs::path activeRO = fs::read_symlink(PNOR_RO_ACTIVE_PATH); |
| 392 | |
| 393 | if (!fs::is_directory(activeRO)) |
| 394 | { |
| 395 | return false; |
| 396 | } |
| 397 | |
| 398 | if (activeRO.string().find(versionId) == std::string::npos) |
| 399 | { |
| 400 | return false; |
| 401 | } |
| 402 | |
| 403 | // active PNOR is the version we're checking |
| 404 | return true; |
| 405 | } |
| 406 | |
| 407 | bool ItemUpdater::isChassisOn() |
| 408 | { |
| 409 | auto mapperCall = bus.new_method_call( |
| 410 | MAPPER_BUSNAME, |
| 411 | MAPPER_PATH, |
| 412 | MAPPER_INTERFACE, |
| 413 | "GetObject"); |
| 414 | |
| 415 | mapperCall.append(CHASSIS_STATE_PATH, |
| 416 | std::vector<std::string>({CHASSIS_STATE_OBJ})); |
| 417 | auto mapperResponseMsg = bus.call(mapperCall); |
| 418 | if (mapperResponseMsg.is_method_error()) |
| 419 | { |
| 420 | log<level::ERR>("Error in Mapper call"); |
| 421 | elog<InternalFailure>(); |
| 422 | } |
| 423 | using MapperResponseType = std::map<std::string, std::vector<std::string>>; |
| 424 | MapperResponseType mapperResponse; |
| 425 | mapperResponseMsg.read(mapperResponse); |
| 426 | if (mapperResponse.empty()) |
| 427 | { |
| 428 | log<level::ERR>("Invalid Response from mapper"); |
| 429 | elog<InternalFailure>(); |
| 430 | } |
| 431 | |
| 432 | auto method = bus.new_method_call((mapperResponse.begin()->first).c_str(), |
| 433 | CHASSIS_STATE_PATH, |
| 434 | SYSTEMD_PROPERTY_INTERFACE, |
| 435 | "Get"); |
| 436 | method.append(CHASSIS_STATE_OBJ, "CurrentPowerState"); |
| 437 | auto response = bus.call(method); |
| 438 | if (response.is_method_error()) |
| 439 | { |
| 440 | log<level::ERR>("Error in fetching current Chassis State", |
Gunnar Mills | 850d5f6 | 2017-10-19 17:04:38 -0500 | [diff] [blame] | 441 | entry("MAPPERRESPONSE=%s", |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 442 | (mapperResponse.begin()->first).c_str())); |
| 443 | elog<InternalFailure>(); |
| 444 | } |
| 445 | sdbusplus::message::variant<std::string> currentChassisState; |
| 446 | response.read(currentChassisState); |
| 447 | auto strParam = |
| 448 | sdbusplus::message::variant_ns::get<std::string>(currentChassisState); |
| 449 | return (strParam != CHASSIS_STATE_OFF); |
| 450 | } |
| 451 | |
Saqib Khan | b8e7f31 | 2017-08-12 10:24:10 -0500 | [diff] [blame] | 452 | void ItemUpdater::freePriority(uint8_t value, const std::string& versionId) |
Saqib Khan | 81bac88 | 2017-06-08 12:17:01 -0500 | [diff] [blame] | 453 | { |
| 454 | //TODO openbmc/openbmc#1896 Improve the performance of this function |
| 455 | for (const auto& intf : activations) |
| 456 | { |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 457 | if (intf.second->redundancyPriority) |
Saqib Khan | 81bac88 | 2017-06-08 12:17:01 -0500 | [diff] [blame] | 458 | { |
Saqib Khan | b8e7f31 | 2017-08-12 10:24:10 -0500 | [diff] [blame] | 459 | if (intf.second->redundancyPriority.get()->priority() == value && |
| 460 | intf.second->versionId != versionId) |
Saqib Khan | 81bac88 | 2017-06-08 12:17:01 -0500 | [diff] [blame] | 461 | { |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 462 | intf.second->redundancyPriority.get()->priority(value + 1); |
Saqib Khan | 81bac88 | 2017-06-08 12:17:01 -0500 | [diff] [blame] | 463 | } |
| 464 | } |
| 465 | } |
| 466 | } |
| 467 | |
Saqib Khan | 2af5c49 | 2017-07-17 16:15:13 -0500 | [diff] [blame] | 468 | bool ItemUpdater::isLowestPriority(uint8_t value) |
| 469 | { |
| 470 | for (const auto& intf : activations) |
| 471 | { |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 472 | if (intf.second->redundancyPriority) |
Saqib Khan | 2af5c49 | 2017-07-17 16:15:13 -0500 | [diff] [blame] | 473 | { |
| 474 | if (intf.second->redundancyPriority.get()->priority() < value) |
| 475 | { |
| 476 | return false; |
| 477 | } |
| 478 | } |
| 479 | } |
| 480 | return true; |
| 481 | } |
| 482 | |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 483 | void ItemUpdater::erase(std::string entryId) |
| 484 | { |
Eddie James | 13fc66a | 2017-08-31 15:36:44 -0500 | [diff] [blame] | 485 | if (isVersionFunctional(entryId) && isChassisOn()) { |
| 486 | log<level::ERR>(("Error: Version " + entryId + \ |
| 487 | " is currently active and running on the host." \ |
| 488 | " Unable to remove.").c_str()); |
| 489 | return; |
| 490 | } |
Saqib Khan | ef8cd9f | 2017-08-16 14:20:30 -0500 | [diff] [blame] | 491 | // Remove priority persistence file |
| 492 | removeFile(entryId); |
| 493 | |
Saqib Khan | 1e0aa5c | 2017-08-31 11:04:17 -0500 | [diff] [blame] | 494 | // Removing read-only and read-write partitions |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 495 | removeReadWritePartition(entryId); |
| 496 | removeReadOnlyPartition(entryId); |
| 497 | |
| 498 | // Removing entry in versions map |
| 499 | auto it = versions.find(entryId); |
| 500 | if (it == versions.end()) |
| 501 | { |
| 502 | log<level::ERR>(("Error: Failed to find version " + entryId + \ |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 503 | " in item updater versions map." \ |
| 504 | " Unable to remove.").c_str()); |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 505 | } |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 506 | else |
| 507 | { |
| 508 | versions.erase(entryId); |
| 509 | } |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 510 | |
| 511 | // Removing entry in activations map |
| 512 | auto ita = activations.find(entryId); |
| 513 | if (ita == activations.end()) |
| 514 | { |
| 515 | log<level::ERR>(("Error: Failed to find version " + entryId + \ |
Gunnar Mills | 3fa7028 | 2017-08-18 15:30:42 -0500 | [diff] [blame] | 516 | " in item updater activations map." \ |
| 517 | " Unable to remove.").c_str()); |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 518 | } |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 519 | else |
| 520 | { |
| 521 | activations.erase(entryId); |
| 522 | } |
| 523 | return; |
Leonel Gonzalez | 9c8adfa | 2017-07-12 11:08:40 -0500 | [diff] [blame] | 524 | } |
| 525 | |
Michael Tritz | 234a07e | 2017-09-21 00:53:06 -0500 | [diff] [blame] | 526 | void ItemUpdater::deleteAll() |
| 527 | { |
Michael Tritz | 234a07e | 2017-09-21 00:53:06 -0500 | [diff] [blame] | 528 | for (const auto& activationIt : activations) |
| 529 | { |
| 530 | if (!isVersionFunctional(activationIt.first)) |
| 531 | { |
Saqib Khan | 7f80e0b | 2017-10-22 11:29:07 -0500 | [diff] [blame] | 532 | ItemUpdater::erase(activationIt.first); |
Michael Tritz | 234a07e | 2017-09-21 00:53:06 -0500 | [diff] [blame] | 533 | } |
| 534 | } |
| 535 | |
Michael Tritz | 234a07e | 2017-09-21 00:53:06 -0500 | [diff] [blame] | 536 | // Remove any remaining pnor-ro- or pnor-rw- volumes that do not match |
| 537 | // the current version. |
| 538 | auto method = bus.new_method_call( |
| 539 | SYSTEMD_BUSNAME, |
| 540 | SYSTEMD_PATH, |
| 541 | SYSTEMD_INTERFACE, |
| 542 | "StartUnit"); |
| 543 | method.append("obmc-flash-bios-cleanup.service", "replace"); |
| 544 | bus.call_noreply(method); |
| 545 | } |
| 546 | |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 547 | // TODO: openbmc/openbmc#1402 Monitor flash usage |
| 548 | void ItemUpdater::freeSpace() |
| 549 | { |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 550 | // Versions with the highest priority in front |
| 551 | std::priority_queue<std::pair<int, std::string>, |
| 552 | std::vector<std::pair<int, std::string>>, |
| 553 | std::less<std::pair<int, std::string>>> versionsPQ; |
| 554 | |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 555 | std::size_t count = 0; |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 556 | for (const auto& iter : activations) |
| 557 | { |
| 558 | if (iter.second.get()->activation() == server::Activation::Activations::Active) |
| 559 | { |
| 560 | count++; |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 561 | // Don't put the functional version on the queue since we can't |
| 562 | // remove the "running" PNOR version. |
Adriana Kobylak | ee201a5 | 2017-11-09 15:05:04 -0600 | [diff] [blame] | 563 | if (isVersionFunctional(iter.second->versionId)) |
| 564 | { |
| 565 | continue; |
| 566 | } |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 567 | versionsPQ.push(std::make_pair( |
| 568 | iter.second->redundancyPriority.get()->priority(), |
| 569 | iter.second->versionId)); |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 570 | } |
| 571 | } |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 572 | |
| 573 | // If the number of PNOR versions is over ACTIVE_PNOR_MAX_ALLOWED -1, |
| 574 | // remove the highest priority one(s). |
| 575 | while ((count >= ACTIVE_PNOR_MAX_ALLOWED) && (!versionsPQ.empty())) |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 576 | { |
Gunnar Mills | fedbf3d | 2018-01-17 11:17:31 -0600 | [diff] [blame^] | 577 | erase(versionsPQ.top().second); |
| 578 | versionsPQ.pop(); |
| 579 | count--; |
Saqib Khan | 2cbfa03 | 2017-08-17 14:52:37 -0500 | [diff] [blame] | 580 | } |
| 581 | } |
| 582 | |
Gunnar Mills | 61010b2 | 2017-09-20 15:25:26 -0500 | [diff] [blame] | 583 | void ItemUpdater::createActiveAssociation(const std::string& path) |
Gunnar Mills | 9741cd1 | 2017-08-28 15:09:00 -0500 | [diff] [blame] | 584 | { |
| 585 | assocs.emplace_back(std::make_tuple(ACTIVE_FWD_ASSOCIATION, |
| 586 | ACTIVE_REV_ASSOCIATION, |
| 587 | path)); |
| 588 | associations(assocs); |
| 589 | } |
| 590 | |
Gunnar Mills | 833e4f3 | 2017-09-14 12:30:27 -0500 | [diff] [blame] | 591 | void ItemUpdater::updateFunctionalAssociation(const std::string& path) |
| 592 | { |
| 593 | // remove all functional associations |
| 594 | for (auto iter = assocs.begin(); iter != assocs.end();) |
| 595 | { |
| 596 | if ((std::get<0>(*iter)).compare(FUNCTIONAL_FWD_ASSOCIATION) == 0) |
| 597 | { |
| 598 | iter = assocs.erase(iter); |
| 599 | } |
| 600 | else |
| 601 | { |
| 602 | ++iter; |
| 603 | } |
| 604 | } |
| 605 | assocs.emplace_back(std::make_tuple(FUNCTIONAL_FWD_ASSOCIATION, |
| 606 | FUNCTIONAL_REV_ASSOCIATION, |
| 607 | path)); |
| 608 | associations(assocs); |
| 609 | } |
| 610 | |
Gunnar Mills | 61010b2 | 2017-09-20 15:25:26 -0500 | [diff] [blame] | 611 | void ItemUpdater::removeActiveAssociation(const std::string& path) |
Gunnar Mills | 9741cd1 | 2017-08-28 15:09:00 -0500 | [diff] [blame] | 612 | { |
| 613 | for (auto iter = assocs.begin(); iter != assocs.end();) |
| 614 | { |
Gunnar Mills | 833e4f3 | 2017-09-14 12:30:27 -0500 | [diff] [blame] | 615 | if ((std::get<0>(*iter)).compare(ACTIVE_FWD_ASSOCIATION) == 0 && |
| 616 | (std::get<2>(*iter)).compare(path) == 0) |
Gunnar Mills | 9741cd1 | 2017-08-28 15:09:00 -0500 | [diff] [blame] | 617 | { |
| 618 | iter = assocs.erase(iter); |
| 619 | associations(assocs); |
| 620 | } |
| 621 | else |
| 622 | { |
| 623 | ++iter; |
| 624 | } |
| 625 | } |
| 626 | } |
| 627 | |
Gunnar Mills | 2badd7a | 2017-09-20 12:51:28 -0500 | [diff] [blame] | 628 | std::string ItemUpdater::determineId(const std::string& symlinkPath) |
| 629 | { |
| 630 | if (!fs::exists(symlinkPath)) |
| 631 | { |
| 632 | return {}; |
| 633 | } |
| 634 | |
| 635 | auto target = fs::canonical(symlinkPath).string(); |
| 636 | |
| 637 | // check to make sure the target really exists |
| 638 | if (!fs::is_regular_file(target + "/" + PNOR_TOC_FILE)) |
| 639 | { |
| 640 | return {}; |
| 641 | } |
| 642 | // Get the image <id> from the symlink target |
| 643 | // for example /media/ro-2a1022fe |
| 644 | static const auto PNOR_RO_PREFIX_LEN = strlen(PNOR_RO_PREFIX); |
| 645 | return target.substr(PNOR_RO_PREFIX_LEN); |
| 646 | } |
| 647 | |
Michael Tritz | b541f1b | 2017-10-15 15:10:21 -0500 | [diff] [blame] | 648 | void GardReset::reset() |
| 649 | { |
| 650 | // The GARD partition is currently misspelled "GUARD." This file path will |
| 651 | // need to be updated in the future. |
| 652 | auto path = fs::path(PNOR_PRSV_ACTIVE_PATH); |
| 653 | path /= "GUARD"; |
| 654 | std::vector<uint8_t> mboxdArgs; |
| 655 | |
| 656 | auto dbusCall = bus.new_method_call( |
| 657 | MBOXD_INTERFACE, |
| 658 | MBOXD_PATH, |
| 659 | MBOXD_INTERFACE, |
| 660 | "cmd"); |
| 661 | |
| 662 | // Suspend mboxd - no args required. |
| 663 | dbusCall.append(static_cast<uint8_t>(3), mboxdArgs); |
| 664 | |
| 665 | auto responseMsg = bus.call(dbusCall); |
| 666 | if (responseMsg.is_method_error()) |
| 667 | { |
| 668 | log<level::ERR>("Error in mboxd suspend call"); |
| 669 | elog<InternalFailure>(); |
| 670 | } |
| 671 | |
| 672 | if (fs::is_regular_file(path)) |
| 673 | { |
| 674 | fs::remove(path); |
| 675 | } |
| 676 | |
| 677 | dbusCall = bus.new_method_call( |
| 678 | MBOXD_INTERFACE, |
| 679 | MBOXD_PATH, |
| 680 | MBOXD_INTERFACE, |
| 681 | "cmd"); |
| 682 | |
| 683 | // Resume mboxd with arg 1, indicating that the flash is modified. |
| 684 | mboxdArgs.push_back(1); |
| 685 | dbusCall.append(static_cast<uint8_t>(4), mboxdArgs); |
| 686 | |
| 687 | responseMsg = bus.call(dbusCall); |
| 688 | if (responseMsg.is_method_error()) |
| 689 | { |
| 690 | log<level::ERR>("Error in mboxd resume call"); |
| 691 | elog<InternalFailure>(); |
| 692 | } |
| 693 | } |
| 694 | |
Adriana Kobylak | befe5ce | 2017-04-05 15:57:44 -0500 | [diff] [blame] | 695 | } // namespace updater |
Adriana Kobylak | 2d8fa22 | 2017-03-15 12:34:32 -0500 | [diff] [blame] | 696 | } // namespace software |
| 697 | } // namespace openpower |