temp - Murray-LIANG/forgetful GitHub Wiki

{
    "@base": "https://10.245.166.94/api/types/replicationSession/instances?fields=currentTransferEstRemainTime,dailySnapReplicationPolicy,dstResourceId,dstSPAInterface,dstSPBInterface,dstStatus,health,hourlySnapReplicationPolicy,id,lastSyncTime,localRole,maxTimeOutOfSync,members,name,networkStatus,remoteSystem,replicationResourceType,srcResourceId,srcSPAInterface,srcSPBInterface,srcStatus,status,syncProgress,syncState&per_page=2000&compact=true",
    "updated": "2019-09-04T02:51:00.112Z",
    "links": [
        {
            "rel": "self",
            "href": "&page=1"
        }
    ],
    "entries": [
        {
            "content": {
                "id": "103079215112_APM00192210744_0000_103079215111_FNM00184901113_0000",
                "replicationResourceType": 10,
                "status": 33793,
                "srcStatus": 0,
                "networkStatus": 2,
                "dstStatus": 6,
                "syncState": 2,
                "localRole": 1,
                "name": "remote-nas_6-nas_6",
                "health": {
                    "value": 10,
                    "descriptionIds": [
                        "ALRT_REPL_FAIL_OVR"
                    ],
                    "descriptions": [
                        "This replication session has failed over."
                    ],
                    "resolutionIds": [
                        "repl_failback"
                    ],
                    "resolutions": [
                        "/help/webhelp/en_US/index.html?#unity_t_replication_session_has_failed_over.html"
                    ]
                },
                "maxTimeOutOfSync": 120,
                "srcResourceId": "nas_6",
                "dstResourceId": "nas_6",
                "syncProgress": 0,
                "currentTransferEstRemainTime": 0,
                "remoteSystem": {
                    "id": "RS_3"
                },
                "srcSPAInterface": {
                    "id": "APM00192210744:if_7"
                },
                "srcSPBInterface": {
                    "id": "APM00192210744:if_8"
                },
                "dstSPAInterface": {
                    "id": "FNM00184901113:if_7"
                },
                "dstSPBInterface": {
                    "id": "FNM00184901113:if_8"
                }
            }
        },
        {
            "content": {
                "id": "171798691936_APM00192210744_0000_171798691876_FNM00184901113_0000",
                "replicationResourceType": 1,
                "status": 33793,
                "srcStatus": 0,
                "networkStatus": 2,
                "dstStatus": 6,
                "syncState": 2,
                "localRole": 1,
                "name": "rep_sess_res_14_res_11_APM00192210744_FNM00184901113",
                "health": {
                    "value": 10,
                    "descriptionIds": [
                        "ALRT_REPL_FAIL_OVR"
                    ],
                    "descriptions": [
                        "This replication session has failed over."
                    ],
                    "resolutionIds": [
                        "repl_failback"
                    ],
                    "resolutions": [
                        "/help/webhelp/en_US/index.html?#unity_t_replication_session_has_failed_over.html"
                    ]
                },
                "maxTimeOutOfSync": 240,
                "srcResourceId": "res_14",
                "dstResourceId": "res_11",
                "syncProgress": 0,
                "currentTransferEstRemainTime": 0,
                "hourlySnapReplicationPolicy": {
                    "isReplicatingSnaps": false,
                    "isRetentionSameAsSource": false,
                    "isAutoDelete": false,
                    "retentionDuration": 0
                },
                "dailySnapReplicationPolicy": {
                    "isReplicatingSnaps": false,
                    "isRetentionSameAsSource": false,
                    "isAutoDelete": false,
                    "retentionDuration": 0
                },
                "remoteSystem": {
                    "id": "RS_3"
                },
                "srcSPAInterface": {
                    "id": "APM00192210744:if_7"
                },
                "srcSPBInterface": {
                    "id": "APM00192210744:if_8"
                },
                "dstSPAInterface": {
                    "id": "FNM00184901113:if_7"
                },
                "dstSPBInterface": {
                    "id": "FNM00184901113:if_8"
                }
            }
        },
        {
            "content": {
                "id": "171798691939_APM00192210744_0000_171798691879_FNM00184901113_0000",
                "replicationResourceType": 1,
                "status": 33793,
                "srcStatus": 0,
                "networkStatus": 2,
                "dstStatus": 6,
                "syncState": 2,
                "localRole": 1,
                "name": "rep_sess_res_15_res_12_APM00192210744_FNM00184901113",
                "health": {
                    "value": 10,
                    "descriptionIds": [
                        "ALRT_REPL_FAIL_OVR"
                    ],
                    "descriptions": [
                        "This replication session has failed over."
                    ],
                    "resolutionIds": [
                        "repl_failback"
                    ],
                    "resolutions": [
                        "/help/webhelp/en_US/index.html?#unity_t_replication_session_has_failed_over.html"
                    ]
                },
                "maxTimeOutOfSync": 120,
                "srcResourceId": "res_15",
                "dstResourceId": "res_12",
                "syncProgress": 0,
                "currentTransferEstRemainTime": 0,
                "hourlySnapReplicationPolicy": {
                    "isReplicatingSnaps": false,
                    "isRetentionSameAsSource": false,
                    "isAutoDelete": false,
                    "retentionDuration": 0
                },
                "dailySnapReplicationPolicy": {
                    "isReplicatingSnaps": false,
                    "isRetentionSameAsSource": false,
                    "isAutoDelete": false,
                    "retentionDuration": 0
                },
                "remoteSystem": {
                    "id": "RS_3"
                },
                "srcSPAInterface": {
                    "id": "APM00192210744:if_7"
                },
                "srcSPBInterface": {
                    "id": "APM00192210744:if_8"
                },
                "dstSPAInterface": {
                    "id": "FNM00184901113:if_7"
                },
                "dstSPBInterface": {
                    "id": "FNM00184901113:if_8"
                }
            }
        }
    ]
}

{
    "error": {
        "errorCode": 105906769,
        "httpStatusCode": 409,
        "messages": [
            {
                "en-US": "The destination file system or VMware NFS Datastore name must be the same as the source file system or VMware NFS Datastore name. (Error Code:0x6500251)"
            }
        ],
        "created": "2019-09-11T10:08:34.297Z"
    }
}


77a64bd4-b5ac-43f6-a116-53d2bd83321b

"1ced9a8a-7d47-4d01-bb2e-6718e5fcd6b5

Sep 25 07:24:41 train manila-share[25706]: DEBUG storops.connection.client [None req-81c0722c-aaa5-454c-92b9-260dad18d1eb None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/resume?compact=True {{(pid=25710) log_request /home/stack/git/storops/storops/connection/client.py:167}}
Sep 25 07:24:51 train manila-share[25706]: DEBUG storops.connection.client [None req-81c0722c-aaa5-454c-92b9-260dad18d1eb None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/resume?compact=True, TIME: 9.504160642623901, RESP CODE: 204 {{(pid=25710) log_response /home/stack/git/storops/storops/connection/client.py:191}}
Sep 25 07:24:51 train manila-share[25706]: DEBUG storops.connection.client [None req-81c0722c-aaa5-454c-92b9-260dad18d1eb None None] RESP BODY:
Sep 25 07:24:51 train manila-share[25706]:  {{(pid=25710) _debug_print_json /home/stack/git/storops/storops/connection/client.py:184}}
Sep 25 07:24:51 train manila-share[25706]: DEBUG storops.connection.client [None req-81c0722c-aaa5-454c-92b9-260dad18d1eb None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/sync?compact=True {{(pid=25710) log_request /home/stack/git/storops/storops/connection/client.py:167}}
Sep 25 07:24:58 train manila-share[25706]: DEBUG storops.connection.client [None req-81c0722c-aaa5-454c-92b9-260dad18d1eb None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/sync?compact=True, TIME: 7.783055782318115, RESP CODE: 204 {{(pid=25710) log_response /home/stack/git/storops/storops/connection/client.py:191}}

Sep 25 07:25:23 train manila-share[25706]: DEBUG storops.connection.client [None req-9cb30ade-c1ee-4f19-819b-ef7ab7ea6bf4 None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/failover?compact=True {{(pid=25710) log_request /home/stack/git/storops/storops/connection/client.py:167}}
Sep 25 07:25:23 train manila-share[25706]: DEBUG storops.connection.client [None req-9cb30ade-c1ee-4f19-819b-ef7ab7ea6bf4 None None] REQ BODY:
Sep 25 07:25:23 train manila-share[25706]: {
Sep 25 07:25:23 train manila-share[25706]:     "sync": true
Sep 25 07:25:23 train manila-share[25706]: } {{(pid=25710) _debug_print_json /home/stack/git/storops/storops/connection/client.py:184}}
Sep 25 07:25:24 train manila-share[25706]: DEBUG storops.connection.client [None req-9cb30ade-c1ee-4f19-819b-ef7ab7ea6bf4 None None] REQ URL: [POST] https://10.245.101.39:443/api/instances/replicationSession/103079215128_APM00192210744_0000_103079215133_APM00192210744_0000/action/failover?compact=True, TIME: 0.4303734302520752, RESP CODE: 409 {{(pid=25710) log_response /home/stack/git/storops/storops/connection/client.py:191}}
Sep 25 07:25:24 train manila-share[25706]: DEBUG storops.connection.client [None req-9cb30ade-c1ee-4f19-819b-ef7ab7ea6bf4 None None] RESP BODY:
Sep 25 07:25:24 train manila-share[25706]: {
Sep 25 07:25:24 train manila-share[25706]:     "error": {
Sep 25 07:25:24 train manila-share[25706]:         "errorCode": 105906786,
Sep 25 07:25:24 train manila-share[25706]:         "httpStatusCode": 409,
Sep 25 07:25:24 train manila-share[25706]:         "messages": [
Sep 25 07:25:24 train manila-share[25706]:             {
Sep 25 07:25:24 train manila-share[25706]:                 "en-US": "Group failover operation failed. Some file system replication sessions are out of sync. To find the specific file system replication sessions, access the audit log on the 'Logs' page in the Unisphere GUI, or use the CLI '/event/log' show command. Perform a manual sync for the file system replication sessions, then retry the group failover operation. (Error Code:0x6500262)"
Sep 25 07:25:24 train manila-share[25706]:             }
Sep 25 07:25:24 train manila-share[25706]:         ],
Sep 25 07:25:24 train manila-share[25706]:         "created": "2019-09-25T07:24:42.326Z"
Sep 25 07:25:24 train manila-share[25706]:     }
Sep 25 07:25:24 train manila-share[25706]: } {{(pid=25710) _debug_print_json /home/stack/git/storops/storops/connection/client.py:184}}


if access_hosts is None:
    access_hosts = set()

access_hosts.discard('-0.0.0.0/0.0.0.0')
access_str = ('access=%(access)s'
              % {'access': ':'.join(list(access_hosts) + ['-0.0.0.0/0.0.0.0'])})
try
{
  std::map<std::string, RESTClient::RestValue> inParams;
  std::string outParams;
  boost::shared_ptr<RESTClient::RESTSession> restSession = RESTClient::RESTSession::MakeInstance();
  restSession->postActionRequest("user", "notifyPasswordChanged", inParams, outParams, 10);
}
catch (...)
{
  SLAP::Logger logger;
  logger.warn("Notify password change failed.", "PapiWrapper::_notifyPasswordChange");
  // Ignore the exception although notify failed because the password was changed successfully.
}

curl -i -k -L -X POST -c cookie.txt -b cookie.txt --header "X-EMC-REST-CLIENT:true" --header "Content-Type:application/json" --header "Accept:application/json" --header "Visibility:Engineering" "https://$ARRAY/api/instances/user/user_admin"