Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
3b33dbb1
Commit
3b33dbb1
authored
4 years ago
by
Cedric Caffy
Browse files
Options
Downloads
Patches
Plain Diff
[cta-taped] Set the reason of a drive at creation time: [cta-taped] INFO Drive created.
parent
915a5298
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
objectstore/DriveState.cpp
+1
-0
1 addition, 0 deletions
objectstore/DriveState.cpp
scheduler/OStoreDB/OStoreDBTest.cpp
+5
-1
5 additions, 1 deletion
scheduler/OStoreDB/OStoreDBTest.cpp
with
6 additions
and
1 deletion
objectstore/DriveState.cpp
+
1
−
0
View file @
3b33dbb1
...
...
@@ -60,6 +60,7 @@ void DriveState::initialize(const std::string & driveName) {
cta
::
common
::
dataStructures
::
DriveState
driveState
;
driveState
.
driveName
=
driveName
;
driveState
.
downOrUpStartTime
=
::
time
(
nullptr
);
driveState
.
desiredDriveState
.
setReasonFromLogMsg
(
cta
::
log
::
INFO
,
"Drive created."
);
setState
(
driveState
);
// This object is good to go (to storage)
m_payloadInterpreted
=
true
;
...
...
This diff is collapsed.
Click to expand it.
scheduler/OStoreDB/OStoreDBTest.cpp
+
5
−
1
View file @
3b33dbb1
...
...
@@ -240,15 +240,19 @@ TEST_P(OStoreDBTest, setDesiredState){
OStoreDBWrapperInterface
&
osdbi
=
getDb
();
AgentReference
&
agentRef
=
osdbi
.
getAgentReference
();
//Create the drive first
std
::
string
expectedReason
=
cta
::
common
::
dataStructures
::
DesiredDriveState
::
c_tpsrvPrefixComment
+
" INFO Drive created."
;
std
::
string
driveName
=
"DRIVE"
;
{
DriveState
ds
(
osdbi
.
getBackend
());
ScopedExclusiveLock
dsl
;
Helpers
::
getLockedAndFetchedDriveState
(
ds
,
dsl
,
agentRef
,
driveName
,
lc
);
//Check the reason is set
ASSERT_EQ
(
expectedReason
,
ds
.
getState
().
desiredDriveState
.
reason
.
value
());
}
cta
::
common
::
dataStructures
::
DesiredDriveState
desiredState
;
desiredState
.
up
=
fals
e
;
desiredState
.
up
=
tru
e
;
desiredState
.
forceDown
=
false
;
desiredState
.
reason
=
""
;
cta
::
common
::
dataStructures
::
DriveState
driveState
;
{
//Test the reason and comment fields are empty
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment