Revert "vos: take RO volume offline during convertROtoRW" 39/14339/3
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Mon, 31 Aug 2020 19:56:56 +0000 (19:56 +0000)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 4 Sep 2020 17:29:18 +0000 (13:29 -0400)
This reverts commit 32d35db64061e4102281c235cf693341f9de9271. While that
commit did fix the mentioned problem, depending on "vos" to set the
volume to be converted as "out of service" is not ideal. Instead, this
volume should be set as offline by the SAFSVolConvertROtoRWvolume RPC,
executed on the volume server.

The proper fix for this problem will be introduced by another commit.

Change-Id: I0ce5ba793fe3c07e535225191b74eeb402ab5bfd
Reviewed-on: https://gerrit.openafs.org/14339
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/volser/vsprocs.c

index 97ce6a0..ffbabdd 100644 (file)
@@ -1342,14 +1342,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid,
        }
     }
 
-    /* volume must be inaccessible during this process */
-    code = UV_SetVolume(server, partition, volid, ITOffline, VTOutOfService, 0);
-    if (code != 0) {
-       fprintf(STDERR, "Taking RO volume %u offline failed with code %d.\n",
-               volid, code);
-       goto error_exit;
-    }
-
     aconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
     code = AFSVolConvertROtoRWvolume(aconn, partition, volid);
     if (code) {
@@ -1359,18 +1351,6 @@ UV_ConvertRO(afs_uint32 server, afs_uint32 partition, afs_uint32 volid,
        PrintError("convertROtoRW ", code);
        goto error_exit;
     }
-
-    /*
-     * Since the inService flag is copied from the RO volume, the new RW copy is
-     * offline. Change the status of this RW volume to online.
-     */
-    code = UV_SetVolume(server, partition, entry->volumeId[RWVOL], ITOffline,
-                       0 /* online */, 0);
-    if (code != 0) {
-       fprintf(STDERR, "Warning: Attempt to set RW volume %u as online failed "
-                       "with code %d.\n", entry->volumeId[RWVOL], code);
-    }
-
     /* Update the VLDB to match what we did on disk as much as possible.  */
     /* If the converted RO was in the VLDB, make it look like the new RW. */
     if (roserver) {