diff --git a/CHANGELOG.md b/CHANGELOG.md index 11dfffa..c308db4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- CASMCMS-8899 - add support for Paradise (xd224) nodes. + ### Changed - Disabled concurrent Jenkins builds on same branch/commit - Added build timeout to avoid hung builds diff --git a/console_data_svc/datastore.go b/console_data_svc/datastore.go index 6b2eb44..4a8f866 100644 --- a/console_data_svc/datastore.go +++ b/console_data_svc/datastore.go @@ -1,7 +1,7 @@ // // MIT License // -// (C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP +// (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), @@ -197,6 +197,8 @@ func dbConsolePodAcquireNodes( var errList []string acquired = []NodeConsoleInfo{} + // NOTE: 'Mountain', 'Hill', and 'Paradise' nodes all count as 'Mountain' nodes since the + // expect script required to connect to the consoles use more resources in the pod. if numMtn > 0 { log.Printf("dbConsolePodAcquireNodes: acquiring %d mtn nodes", numMtn) // The mountain hardware may be classified as either 'Mountain' or 'Hill' @@ -216,6 +218,21 @@ func dbConsolePodAcquireNodes( errList = append(errList, newErrList...) acquired = append(acquired, newAcquired...) } + + // if we don't have enough 'Mountain' and 'Hill' nodes, look for 'Paradise' nodes + if len(acquired) < numMtn { + log.Printf("dbConsolePodAcquireNodes: acquiring %d paradise nodes", numMtn-len(acquired)) + newNodes, newErrList, newAcquired := acquireNodesOfType("Paradise", numMtn-len(acquired)) + if len(newNodes) > 0 { + if len(nodes) > 0 { + nodes += fmt.Sprintf(", %s ", newNodes) + } else { + nodes = newNodes + } + } + errList = append(errList, newErrList...) + acquired = append(acquired, newAcquired...) + } } if numRvr > 0 {