Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CASMCMS-8899 - support for Paradise nodes. #53

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 18 additions & 1 deletion console_data_svc/datastore.go
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down Expand Up @@ -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'
Expand All @@ -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 {
Expand Down
Loading