Comments (3)
Hi @trel
does this new microservice is available in 4.1.9 or do you have a workaround to handle the situation, I am facing same issue !
from contrib.
We have not added this microservice yet.
The workaround is to have the iadmin modresc RESCNAME rebalance
command run periodically on the server and it will keep the policy defined by the replication resource 'up to date' by making sure the specified children resources keep their replicas are current.
from contrib.
candidate msiRunRebalance
from 2016 from @stillwell ...
#define RODS_SERVER 1
#include "reGlobalsExtern.hpp"
#include "reFuncDefs.hpp"
#include "icatHighLevelRoutines.hpp"
#include "rcMisc.h"
#include "generalAdmin.h"
#include "irods_server_properties.hpp"
#include "irods_ms_plugin.hpp"
// =-=-=-=-=-=-=-
// STL Includes
#include <iostream>
extern "C" {
/**
* \fn msiRunRebalance(msParam_t *resource, ruleExecInfo_t *rei)
*
* \brief runs modresc rebalance for given resource
*
* \module dfc
*
* \since 4.1.x
*
*
*
* \usage See clients/icommands/test/rules/
*
* \param[in] resource - a STR_MS_T with the name of the resource where
* the reblalnce will apply.
* \param[in,out] rei - The RuleExecInfo structure that is automatically
* handled by the rule engine. The user does not include rei as a
* parameter in the rule invocation.
*
* \iCatAttrDependence None
* \iCatAttrModified Updates synchronizes child resource if provided resource is type: replication
* \sideeffect None
*
* \return integer
* \retval 0 on success
* \pre None
* \post None
* \sa None
*
**/
// =-=-=-=-=-=-=-
int
msiRunRebalance( msParam_t* resource, ruleExecInfo_t* rei ) {
generalAdminInp_t generalAdminInp;
int status;
/* For testing mode when used with irule --test */
RE_TEST_MACRO( " Calling msiRunRebalance" )
/* Sanity checks */
if ( rei == NULL || rei->rsComm == NULL ) {
rodsLog( LOG_ERROR, "msiRunRebalance: input rei or rsComm is NULL." );
return SYS_INTERNAL_NULL_INPUT_ERR;
}
/* Must be called from an admin account */
if ( rei->uoic->authInfo.authFlag < LOCAL_PRIV_USER_AUTH ) {
status = CAT_INSUFFICIENT_PRIVILEGE_LEVEL;
rodsLog( LOG_ERROR, "msiRunRebalance: User %s is not local admin. Status = %d",
rei->uoic->userName, status );
return status;
}
/* Prepare generalAdminInp. It needs to be set up as follows:
* generalAdminInp.arg0: "modresc"
* generalAdminInp.arg1: resource name
* generalAdminInp.arg2: "rebalance"
* generalAdminInp.arg3: ""
* generalAdminInp.arg4: ""
* generalAdminInp.arg5: ""
* generalAdminInp.arg6: ""
* generalAdminInp.arg7: ""
* generalAdminInp.arg8: ""
* generalAdminInp.arg9: ""
*/
memset( &generalAdminInp, 0, sizeof( generalAdminInp_t ) );
generalAdminInp.arg0 = "modify";
generalAdminInp.arg1 = "resource";
/* Parse resource name */
if ( ( generalAdminInp.arg2 = parseMspForStr( resource ) ) == NULL ) {
rodsLog( LOG_ERROR, "msiRunRebalance: Null resource provided." );
return SYS_INTERNAL_NULL_INPUT_ERR;
}
//memset( &generalAdminInp, 0, sizeof( generalAdminInp_t ) );
generalAdminInp.arg3 = "rebalance";
/* Fill up the rest of generalAdminInp */
generalAdminInp.arg4 = "";
generalAdminInp.arg5 = "";
generalAdminInp.arg6 = "";
generalAdminInp.arg7 = "";
generalAdminInp.arg8 = "";
generalAdminInp.arg9 = "";
/* Call rsGeneralAdmin */
status = rsGeneralAdmin( rei->rsComm, &generalAdminInp );
/* Done */
return status;
}
irods::ms_table_entry* plugin_factory() {
irods::ms_table_entry* msvc = new irods::ms_table_entry( 1 );
msvc->add_operation( "msiRunRebalance", "msiRunRebalance" );
return msvc;
}
};
from contrib.
Related Issues (20)
- update ec2 instance demo for 4.1.8 HOT 1
- Rule registry
- Microservice registry
- Micro-service to add token names
- Integrate SANBI-SA/irods_docker for persistent storage
- new api plugin to list operations per plugin type
- OSCS POC
- stop using systemd in elk stack container
- Investigate swapping JDK for JRE in elk stack container HOT 1
- Docker image directory structure for volume mounting HOT 1
- irods_audit_elk_stack container RabbitMQ test user missing HOT 1
- irods_audit_elk_stack Dockerfile not building HOT 6
- Update elk stack container to Ubuntu 24.04 HOT 2
- ELK stack container: switch to distro-provided Java runtime
- ELK stack container: Investigate using GraalVM CE
- ELK stack container: elasticsearch will not start
- ELK stack container, docker run instruction can't find HOT 22
- dashboard still relies on audit_ namespace HOT 4
- ELK stack README needs updating
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from contrib.