Skip to Main Content

Reversing replication with RESTful API

Stephen BancroftApr 25 2018 — edited Sep 28 2018

I'm trying to develop some Python scripts to manage our ZFS SA with, so far it's going ok and I can do mostly what I want. However I seem to have struck a problem with reversing replication, ie: it does not work, at least on the simulator.

Basically I keep getting 404

{
    "fault": {
        "code": 404,
        "message": "the requested item was not found (invalid command \"reverse db_aclys02_fcarch\" (encountered while attempting to run command \"confirm reverse db_aclys02_fcarch\"))",
        "name": "ERR_NOT_FOUND"
    }
}

I know I am doing the PUT correctly to the correct URL

/api/storage/v1/replication/sources/zfssa-00a/packages/ee116371-9558-cab7-a4f0-b652bca81db1/reverse

The manual says to PUT data={"projname":"project"} but it seems that produces the 404. I'm stuck at this point, either the manual is incorrect or the simulator is broken. Unfortunately reversing replication is

not something I really what to test on production.

/api/storage/v1/replication/sources/zfssa-00a/packages/ee116371-9558-cab7-a4f0-b652bca81db1     works just fine and produces the expected JSON

{

"package": {

"last_result": "success",

"state_description": "Idle (no update in progress)",

"source_name": "zfssa-00a",

"enabled": true,

"last_try": "Thu Apr 26 2018 10:29:54 GMT+0000 (UTC)",

"target_pool": "VM-MIRROR",

"source_ip": "192.168.1.1:216",

"data_timestamp": "Thu Apr 26 2018 10:29:53 GMT+0000 (UTC)",

"state": "idle",

"href": "/api/storage/v1/replication/sources/zfssa-00a/packages/ee116371-9558-cab7-a4f0-b652bca81db1",

"import_path": "",

"replica_of": "db_aclys02_fcarch",

"source_pool": "VM-MIRROR",

"offline": false,

"last_sync": "Thu Apr 26 2018 10:29:54 GMT+0000 (UTC)",

"projects": [

{

"href": "/api/storage/v1/replication/sources/zfssa-00a/packages/ee116371-9558-cab7-a4f0-b652bca81db1/projects/db_aclys02_fcarch"

}

],

"id": "ee116371-9558-cab7-a4f0-b652bca81db1",

"source_asn": "2c09eb30-9cff-e8b3-cf14-d4ba11afb81a"

}

}

Any help is appreciated.

Comments
Post Details
Added on Apr 25 2018
2 comments
178 views