Open ketiltrout opened 4 weeks ago
This looks like a complete list of commands, but I'd like to see a way of seeing the last n transfers that were cancelled or ignored as well as the last n transfers that were run (which i assume is action list) . - You mentioned this was more server metrics but it would be useful regardless
I've added a transfer list
command which I think might do what you want, with the right set of filtering options
After getting some familiarity working on the client for a while, I've removed the transfer
and action
"noun" groups.
I think it's better to limit the groups to "concrete" objects: Groups, Node, Acqs, Files (including File Copies).
I've dispersed the functionality of the removed groups to the other ones. Let me know what you think, and if you can see any gap in functionality that I've missed.
After developing the on-demand import framework for the daemon (#235) I've been thinking about the need to have the ability to manually modify Archive entries in the database with the CLI. With that in mind, I've added the following commands to the list above to permit that:
acq create NAME --notes=COMMEMNT
file create -- create a new ArchiveFile record
file create NAME ACQ_NAME --md5=<SUM> --size=<SIZE>
file create NAME ACQ_NAME --from-file --prefix=PREFIX
i.e. stats/md5s local file [PREFIX/]ACQ_NAME/NAME
to generate MD5 and size (PREFIX
is optional, to tell alpenhorn where to find the file)Neither of these methods involve using an import-detect plugin, meaning no third-party callback is invoke. See file import
if you want to have that functionality
file import -- request import of a file on a node (via ArchiveFileImportRequest
)
file import PATH NODE --register-new
file modify -- can be used to change MD5 / size
file modify PATH --md5=<sum> --size=<SIZE>
file modify NAME ACQ_NAME --from-file --prefix=PREFIX
These command also use the "file" command group for simplicity)
file state -- set the state of a file (copy) on a node
file state PATH NODE_NAME --<STATE> --create --ready/-not-ready
<STATE>
is one of:
--present
: has_file='Y' wants_file='Y'--cleaned
: has_file='Y' wants_file='M'--released
: has_file='Y' wants_file='N'--suspect
: has_file='M' wants_file='Y'--corrupt
: has_file='X' wants_file='Y'--missing
: has_file='N' wants_file='Y'--removed
: has_file='N' wants_file='N'This can be used to create new ArchiveFileCopy
records (--create-new)
ArchiveFileCopy.wants_file
for existing records
A proposal for the client command list, to see what we need. Per #122, we will stick to
<noun> <verb>
:db
- database maintenance #231db init
- create tables, if necessarydb status
. Status of what?db check
. Check integrity (table interconnections)group
- for StorageGroup: Implementation #204group autosync GROUP NODE
: #228group create
- create new groupgroup list
- list groupsgroup modify GROUP
- edit group metadatagroup nodes GROUP
- list nodes in groupgroup rename GROUP
- rename groupgroup show GROUP
- show StorageGroup record--actions
- to show auto-actions: #228--transfers
- to summarise pending transfers in #238group sync GROUP NODE
#233node sync NODE GROUP
group add-node
. See #205node
- for StorageNode: Partial implementation #221node activate NODE
- activate nodenode autoclean NODE GROUP
: #228node clean
- clean node of file copies #223--include-bad
- also clean suspect/corrupt files. #226node create
- create new node.node deactivate NODE
- deactivate nodeSeenode files NODE...
list files on nodefile status
node init
#237node list
- list nodes (curently called "status")node modify NODE
- edit node metadatanode rename NODE
- rename nodenode scan
- scan the node for known files to add (in alpenhorn-1 this was called "import-files", but in alpenhorn-2 client currently called "scan") #236node show NODE
- show StorageNode record: #224--actions
- to show auto-actions: #228--transfers
- to summarise pending transfers out #238node stats NODE
- show file counts/sizes on nodenode sync NODE GROUP
#233node verify NODE PATH...
re-verify file(s) on node. #229acq
- for ArchiveAcq: Implementation #206acq create NAME
- create newArchiveAcq
record #239acq files ACQ
- listArchiveFile
s in ACQacq list --node=<NODE> --group=<GROUP>
- list acquisitions, optionally limited to node/groupacq show ACQ
- showArchiveAcq
record for ACQmerged intoacq where ACQ
- which nodes contain files from ACQ?show
file
- for ArchiveFile and ArchiveFileCopyfile clean FILE...
setArchiveFileCopy.has_file
for existing record #257file create NAME ACQ
create newArchiveFIle
record directly #251file find
listArchiveFileCopy
s #261file import PATH
request import ofPATH
by daemon #249file list
- listArchiveFile
s #247file modify
- modifyArchiveFile
data (MD5 and size) #255file show FILE
showArchiveFile
record #246file state FILE NODE
get/update/createArchiveFileCopy
record for FILE on NODE #259file status FILE
summarise ArchiveFileCopy status across storage nodesfile show
file sync FILE NODE GROUP
- transfer file from node to group #256seefile where FILE
- list nodes containing filefile show --nodes
Dispersed totransfer
- for ArchiveFileCopyRequestgroup/node/file
. See comment belowtransfer request NODE GROUP FILE...
- create transfer request for file(s) from node to groupfile transfer
transfer cancel NODE GROUP FILE
- cancel pending request for FILE from NODE to GROUPfile transfer --cancel
transfer list
- list transfersfile status --show-transfers
transfer pending
- list pending transfer statsgroup show --show-transfers
node show --show-transfers
file status --show-transfers
transfer sync NODE GROUP
- sync node to group (transfer all file not already present in group)node sync
group sync
Dispersed toaction
- for StorageTransferActiongroup/node
. See comment belowaction list
- list StorageTransferActionnode show --show-actions
group show --show-actions
action show NODE GROUP
- show StorageTransferAction for node-to-groupnode show --show-actions
group show --show-actions
group auto-sync
node auto-clean
transport
- transport disk stuff.~ Not sure about this. It's very different to the rest of the alpenhorn commands.transport create
- yikes Formerly calledformat-transport
.~transport mount
- mount and activate~transport unmount
- deactivate and unmount~transport list
- list transport disksgroup show TRANSPORT_GROUP_NAME --show-nodes