aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.rst39
-rw-r--r--src/main/java/org/onap/music/datastore/MusicDataStore.java70
-rw-r--r--src/main/java/org/onap/music/datastore/jsonobjects/AAFResponse.java13
-rw-r--r--src/main/java/org/onap/music/eelf/logging/format/AppMessages.java45
-rwxr-xr-xsrc/main/java/org/onap/music/rest/RestMusicAdminAPI.java4
5 files changed, 107 insertions, 64 deletions
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 766fb123..d764cedd 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -4,45 +4,54 @@
Release Notes
=============
-Initial Release for Beijing
+Initial Release for Casablanca
-Version: 2.5.4
---------------
+Version: 3.0.24
+---------------
-:Release Date: 2018-06-07
+:Release Date: 2018-11-30
**New Features**
-MUSIC provides a service with recipes that individual ONAP components and microservice can use for
- - state replication across multiple geo-distributed sites
- - flexible fine-grained consistency management of state
- - policy driven state-ownership across replicas of the service
+- MUSIC as a Service: while MUSIC was consumed internally by components in the Beijing release, in Cassablanca MUSIC can be deployed as an independent multi-site clustered service
+
+- Designed MUSIC to be a fully sharded, scale out system, where as many ONAP sites/component replicas can be added as required for performance
+
+- Automated failure detection and consistent failover across sites for ONAP components using MUSIC through the PROM recipe
+
+- Continued adherence to ONAP S3P requirements
**Bug Fixes**
- - `MUSIC-33 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-33>`_ CriticalPut is causing HTTP Status 500 – Internal Server Error
+ - `MUSIC-176 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-176>`_ nc: bad address
+
+ - `MUSIC-154 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-154>`_ Helm charts using latest tag name
+
+ - `MUSIC-152 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-152>`_ MUSIC tomcat returning HTTP 401
+
+ - `MUSIC-147 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-147>`_ Cassandra-job is failing
- - `MUSIC-34 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-34>`_ CreateTable,InsertIntoTable,UpdateTable,DeleteFromTable,DropTable don't check resource existence
+ - `MUSIC-143 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-143>`_ Translator Service not picking records from controller
- - `MUSIC-35 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-35>`_ Onboarding issues
+ - `MUSIC-78 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-78>`_ Build failed to find artifact org.onap.music:MUSIC:jar:2.5.5
- - `MUSIC-36 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-36>`_ Test Case failing
- - `MUSIC-37 <https://jira.onap.org/projects/MUSIC/issues/MUSIC-37>`_ Acquire lock to return more information
**Known Issues**
N/A
**Security Notes**
-MUSIC code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The MUSIC open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=25439359>`_.
+MUSIC code has been formally scanned during build time using NexusIQ and all Critical vulnerabilities have been addressed, items that remain open have been assessed for risk and determined to be false positive. The MUSIC open Critical security vulnerabilities and their risk assessment have been documented as part of the `project <https://wiki.onap.org/pages/viewpage.action?pageId=45285410>`_.
Quick Links:
- `MUSIC project page <https://wiki.onap.org/display/DW/MUSIC+Project>`_
+- `MUSIC Casablanca Release <https://wiki.onap.org/display/DW/MUSIC+Casablanca+Release>`_
- `Passing Badge information for MUSIC <https://bestpractices.coreinfrastructure.org/en/projects/1722>`_
-- `Project Vulnerability Review Table for MUSIC <https://wiki.onap.org/pages/viewpage.action?pageId=25439359>`_
+- `MUSIC Architecture Page <https://onap.readthedocs.io/en/casablanca/submodules/music.git/docs/architecture.html>`_
+- `Project Vulnerability Review Table for MUSIC <https://wiki.onap.org/pages/viewpage.action?pageId=45285410>`_
**Upgrade Notes**
diff --git a/src/main/java/org/onap/music/datastore/MusicDataStore.java b/src/main/java/org/onap/music/datastore/MusicDataStore.java
index 9e3a4bf8..c6b022cc 100644
--- a/src/main/java/org/onap/music/datastore/MusicDataStore.java
+++ b/src/main/java/org/onap/music/datastore/MusicDataStore.java
@@ -70,33 +70,10 @@ public class MusicDataStore {
- /**
- * @param session
- */
- public void setSession(Session session) {
- this.session = session;
- }
-
- /**
- * @param session
- */
- public Session getSession() {
- return session;
- }
-
- /**
- * @param cluster
- */
- public void setCluster(Cluster cluster) {
- this.cluster = cluster;
- }
-
-
-
private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MusicDataStore.class);
/**
- *
+ *
*/
public MusicDataStore() {
connectToCassaCluster();
@@ -113,7 +90,7 @@ public class MusicDataStore {
}
/**
- *
+ *
* @param remoteIp
* @throws MusicServiceException
*/
@@ -121,10 +98,34 @@ public class MusicDataStore {
try {
connectToCassaCluster(remoteIp);
} catch (MusicServiceException e) {
+ logger.error("Exception", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage());
}
}
+
+
+ /**
+ * @param session
+ */
+ public void setSession(Session session) {
+ this.session = session;
+ }
+
+ /**
+ * @param session
+ */
+ public Session getSession() {
+ return session;
+ }
+
+ /**
+ * @param cluster
+ */
+ public void setCluster(Cluster cluster) {
+ this.cluster = cluster;
+ }
+
/**
*
* @return
@@ -134,16 +135,18 @@ public class MusicDataStore {
try {
Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces();
while (en.hasMoreElements()) {
- NetworkInterface ni = (NetworkInterface) en.nextElement();
+ NetworkInterface ni = en.nextElement();
Enumeration<InetAddress> ee = ni.getInetAddresses();
while (ee.hasMoreElements()) {
- InetAddress ia = (InetAddress) ee.nextElement();
+ InetAddress ia = ee.nextElement();
allPossibleIps.add(ia.getHostAddress());
}
}
} catch (SocketException e) {
+ logger.error("Exception", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), AppMessages.CONNCECTIVITYERROR, ErrorSeverity.ERROR, ErrorTypes.CONNECTIONERROR);
}catch(Exception e) {
+ logger.error("Exception", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), ErrorSeverity.ERROR, ErrorTypes.GENERALSERVICEERROR);
}
return allPossibleIps;
@@ -190,6 +193,7 @@ public class MusicDataStore {
break;
} catch (NoHostAvailableException e) {
+ logger.error("Exception", e);
address = it.next();
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.HOSTUNAVAILABLE, ErrorSeverity.ERROR, ErrorTypes.CONNECTIONERROR);
}
@@ -236,6 +240,7 @@ public class MusicDataStore {
try {
session = cluster.connect();
} catch (Exception ex) {
+ logger.error("Exception", ex);
logger.error(EELFLoggerDelegate.errorLogger, ex.getMessage(),AppMessages.CASSANDRACONNECTIVITY, ErrorSeverity.ERROR, ErrorTypes.SERVICEUNAVAILABLE);
throw new MusicServiceException(
"Error while connecting to Cassandra cluster.. " + ex.getMessage());
@@ -306,8 +311,7 @@ public class MusicDataStore {
public byte[] getBlobValue(Row row, String colName, DataType colType) {
ByteBuffer bb = row.getBytes(colName);
- byte[] data = bb.array();
- return data;
+ return bb.array();
}
public boolean doesRowSatisfyCondition(Row row, Map<String, Object> condition) throws Exception {
@@ -338,7 +342,7 @@ public class MusicDataStore {
ColumnDefinitions colInfo = row.getColumnDefinitions();
HashMap<String, Object> resultOutput = new HashMap<>();
for (Definition definition : colInfo) {
- if (!definition.getName().equals("vector_ts")) {
+ if (!(("vector_ts").equals(definition.getName()))) {
if(definition.getType().toString().toLowerCase().contains("blob")) {
resultOutput.put(definition.getName(),
getBlobValue(row, definition.getName(), definition.getType()));
@@ -386,9 +390,11 @@ public class MusicDataStore {
preparedInsert = session.prepare(queryObject.getQuery());
} catch(InvalidQueryException iqe) {
+ logger.error("Exception", iqe);
logger.error(EELFLoggerDelegate.errorLogger, iqe.getMessage(),AppMessages.QUERYERROR, ErrorSeverity.CRITICAL, ErrorTypes.QUERYERROR);
throw new MusicQueryException(iqe.getMessage());
}catch(Exception e) {
+ logger.error("Exception", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.QUERYERROR, ErrorSeverity.CRITICAL, ErrorTypes.QUERYERROR);
throw new MusicQueryException(e.getMessage());
}
@@ -407,10 +413,12 @@ public class MusicDataStore {
}
catch (AlreadyExistsException ae) {
+ logger.error("Exception", ae);
logger.error(EELFLoggerDelegate.errorLogger, ae.getMessage(),AppMessages.SESSIONFAILED+ " [" + queryObject.getQuery() + "]", ErrorSeverity.ERROR, ErrorTypes.QUERYERROR);
throw new MusicServiceException(ae.getMessage());
}
catch (Exception e) {
+ logger.error("Exception", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.SESSIONFAILED+ " [" + queryObject.getQuery() + "]", ErrorSeverity.ERROR, ErrorTypes.QUERYERROR);
throw new MusicQueryException("Executing Session Failure for Request = " + "["
+ queryObject.getQuery() + "]" + " Reason = " + e.getMessage());
@@ -446,6 +454,7 @@ public class MusicDataStore {
results = session.execute(preparedEventualGet.bind(queryObject.getValues().toArray()));
} catch (Exception ex) {
+ logger.error("Exception", ex);
logger.error(EELFLoggerDelegate.errorLogger, ex.getMessage(),AppMessages.UNKNOWNERROR+ "[" + queryObject.getQuery() + "]", ErrorSeverity.ERROR, ErrorTypes.QUERYERROR);
throw new MusicServiceException(ex.getMessage());
}
@@ -476,6 +485,7 @@ public class MusicDataStore {
try {
results = session.execute(preparedEventualGet.bind(queryObject.getValues().toArray()));
} catch (Exception ex) {
+ logger.error("Exception", ex);
logger.error(EELFLoggerDelegate.errorLogger, ex.getMessage(),AppMessages.UNKNOWNERROR+ "[" + queryObject.getQuery() + "]", ErrorSeverity.ERROR, ErrorTypes.QUERYERROR);
throw new MusicServiceException(ex.getMessage());
}
diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/AAFResponse.java b/src/main/java/org/onap/music/datastore/jsonobjects/AAFResponse.java
index df6089ee..b0f41311 100644
--- a/src/main/java/org/onap/music/datastore/jsonobjects/AAFResponse.java
+++ b/src/main/java/org/onap/music/datastore/jsonobjects/AAFResponse.java
@@ -2,7 +2,9 @@
* ============LICENSE_START==========================================
* org.onap.music
* ===================================================================
- * Copyright (c) 2017 AT&T Intellectual Property
+ * Copyright (c) 2017 AT&T Intellectual Property
+ * ===================================================================
+ * Modifications Copyright (c) 2018 IBM
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,21 +23,22 @@
*/
package org.onap.music.datastore.jsonobjects;
-import java.util.ArrayList;
+import java.util.List;
+
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "JsonTable", description = "Reponse class for AAF request")
public class AAFResponse {
- private ArrayList<NameSpace> ns = null;
+ private List<NameSpace> ns = null;
@ApiModelProperty(value = "Namespace value")
- public ArrayList<NameSpace> getNs() {
+ public List<NameSpace> getNs() {
return ns;
}
- public void setNs(ArrayList<NameSpace> ns) {
+ public void setNs(List<NameSpace> ns) {
this.ns = ns;
}
diff --git a/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java b/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
index 2c7952b2..bef61f25 100644
--- a/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
+++ b/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
@@ -88,9 +88,9 @@ public enum AppMessages {
* 1000-1099 Reserved - do not use
*
*/
-
-
-
+
+
+
MISSINGINFO("[ERR100E]", "Missing Information ","Details: NA", "Please check application credentials and/or headers"),
AUTHENTICATIONERROR("[ERR101E]", "Authentication error occured ","Details: NA", "Please verify application credentials"),
@@ -122,16 +122,17 @@ public enum AppMessages {
CACHEERROR("[ERR600E]"," Error initializing the cache",""," Error initializing the cache"),
UNKNOWNERROR("[ERR900E]"," Unexpected error occured",""," Please check logs for details");
-
-
-
- ErrorTypes eType;
- ErrorSeverity alarmSeverity;
- ErrorSeverity errorSeverity;
- String errorCode;
- String errorDescription;
- String details;
- String resolution;
+
+
+
+
+ private ErrorTypes eType;
+ private ErrorSeverity alarmSeverity;
+ private ErrorSeverity errorSeverity;
+ private String errorCode;
+ private String errorDescription;
+ private String details;
+ private String resolution;
AppMessages(String errorCode, String errorDescription, String details,String resolution) {
@@ -157,19 +158,37 @@ public enum AppMessages {
this.details = details;
this.resolution = resolution;
}
+ public ErrorTypes getEType() {
+ return eType;
+ }
+
+ public ErrorSeverity getAlarmSeverity() {
+ return alarmSeverity;
+ }
+ public ErrorSeverity getErrorSeverity() {
+ return errorSeverity;
+ }
+
+ public void setDetails(String details){ this.details=details; }
public String getDetails() {
return this.details;
}
+ public void setResolution(String resolution){ this.resolution=resolution; }
+
public String getResolution() {
return this.resolution;
}
+ public void setErrorCode(String errorCode){ this.errorCode=errorCode; }
+
public String getErrorCode() {
return this.errorCode;
}
+ public void setErrorDescription(String errorDescription){ this.errorDescription=errorDescription; }
+
public String getErrorDescription() {
return this.errorDescription;
}
diff --git a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
index 33128f3c..7fb7b1d5 100755
--- a/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
+++ b/src/main/java/org/onap/music/rest/RestMusicAdminAPI.java
@@ -4,6 +4,8 @@
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
* ===================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -939,7 +941,7 @@ public class RestMusicAdminAPI {
pQuery.addValue(MusicUtil.convertToActualDataType(DataType.text(), notifyOn));
MusicCore.nonKeyRelatedPut(pQuery, MusicUtil.EVENTUAL);
} catch(Exception e) {
- e.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger,e.getMessage());
return response.status(Status.BAD_REQUEST).entity(new JsonResponse(ResultType.FAILURE).setMessage("Callback api registration failed").toMap()).build();
}
return response.status(Status.OK).entity(new JsonResponse(ResultType.SUCCESS).setMessage("Callback api successfully deleted").toMap()).build();