Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BF3A2200ABF for ; Tue, 3 May 2016 09:37:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BDBAA1609F2; Tue, 3 May 2016 09:37:14 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EA6561609F3 for ; Tue, 3 May 2016 09:37:13 +0200 (CEST) Received: (qmail 97983 invoked by uid 500); 3 May 2016 07:37:13 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 97966 invoked by uid 500); 3 May 2016 07:37:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 97960 invoked by uid 99); 3 May 2016 07:37:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 07:37:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D4D8A2C14F9 for ; Tue, 3 May 2016 07:37:12 +0000 (UTC) Date: Tue, 3 May 2016 07:37:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 07:37:14 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D15268289#comment-15268289 ]=20 ASF GitHub Bot commented on CLOUDSTACK-9299: -------------------------------------------- Github user rhtyd commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1502#discussion_r61846775 =20 --- Diff: server/src/org/apache/cloudstack/outofbandmanagement/OutOfBan= dManagementServiceImpl.java --- @@ -0,0 +1,532 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you 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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.outofbandmanagement; + +import com.cloud.alert.AlertManager; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenterDetailVO; +import com.cloud.dc.dao.DataCenterDetailsDao; +import com.cloud.domain.Domain; +import com.cloud.event.ActionEvent; +import com.cloud.event.ActionEventUtils; +import com.cloud.event.EventTypes; +import com.cloud.host.Host; +import com.cloud.host.dao.HostDao; +import com.cloud.org.Cluster; +import com.cloud.utils.component.Manager; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.db.GlobalLock; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.TransactionCallback; +import com.cloud.utils.db.TransactionStatus; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; +import com.google.common.base.Strings; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.common.collect.ImmutableMap; +import org.apache.cloudstack.api.response.OutOfBandManagementResponse; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.Configurable; +import org.apache.cloudstack.outofbandmanagement.dao.OutOfBandManageme= ntDao; +import org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManag= ementDriverChangePasswordCommand; +import org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManag= ementDriverPowerCommand; +import org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManag= ementDriverResponse; +import org.apache.cloudstack.utils.identity.ManagementServerNode; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +@Component +@Local(value =3D {OutOfBandManagementService.class}) +public class OutOfBandManagementServiceImpl extends ManagerBase implem= ents OutOfBandManagementService, Manager, Configurable { + public static final Logger LOG =3D Logger.getLogger(OutOfBandManag= ementServiceImpl.class); + + @Inject + private ClusterDetailsDao clusterDetailsDao; + @Inject + private DataCenterDetailsDao dataCenterDetailsDao; + @Inject + private OutOfBandManagementDao outOfBandManagementDao; + @Inject + private HostDao hostDao; + @Inject + private AlertManager alertMgr; + + private String name; + private long serviceId; + + private List outOfBandManagementDrivers= =3D new ArrayList<>(); + private Map outOfBandManagement= DriversMap =3D new HashMap(); + + private static final String OOBM_ENABLED_DETAIL =3D "outOfBandMana= gementEnabled"; + private static final int ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_HOST =3D = 120; + + private Cache hostAlertCache; + private static ExecutorService backgroundSyncExecutor; --- End diff -- =20 variables are configured in configure(), we should not declare them fin= al without initializing them. > Out-of-band Management for CloudStack > ------------------------------------- > > Key: CLOUDSTACK-9299 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-929= 9 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Reporter: Rohit Yadav > Assignee: Rohit Yadav > Fix For: 4.9.0, Future > > > Support access to a host=E2=80=99s out-of-band management interface (e.g.= IPMI, iLO, DRAC, etc.) to manage host power operations (on/off etc.) and q= uerying current power state. > FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Ma= nagement+for+CloudStack -- This message was sent by Atlassian JIRA (v6.3.4#6332)