openEuler 22.03 LTS SP3源码编译部署OpenStack-Caracal遇到的问题解决

openEuler 22.03 LTS SP3源码编译部署OpenStack-Caracal遇到的问题解决

  • 问题一 给路由设置外部网关后Status为DOWN(使用的是OVN)
    • 问题描述
    • 临时的解决办法
    • 永久解决办法(修改源代码)
  • 问题二 分离卷一直显示分离中
    • 问题描述
    • 解决办法(不太严谨)

问题一 给路由设置外部网关后Status为DOWN(使用的是OVN)

问题描述

问题如下图
在这里插入图片描述
经过排查后发现是
Logical_Router_Port的gateway_chassis : []为空导致openstack给路由设置外部网关后Status为DOWN
在这里插入图片描述

临时的解决办法

临时的解决办法是手动去添加gateway_chassis
首先通过如下命令查看需要添加的gateway_chassis的_uuid

ovn-nbctl list Logical_Router_Port

在这里插入图片描述再通过如下命令去查看需要添加的chassis值

ovn-sbctl show

在这里插入图片描述
在通过如下的命令去手动的添加即可

ovn-nbctl lrp-set-gateway-chassis _uuid值 Chassis值

在这里插入图片描述

永久解决办法(修改源代码)

只所以会出现这个状况是因为在代码中添加chassis无法匹配到合适的
具体如下
有关代码的路径如下
/usr/local/lib/python3.9/site-packages/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb
代码文件名叫ovn_client.py
未修改源代码如下

def get_candidates_for_scheduling(self, physnet, cms=None,chassis_physnets=None,availability_zone_hints=None):"""Return chassis for scheduling gateway router.Criteria for selecting chassis as candidates1) Chassis from cms with proper bridge mappings only (that means thesegateway chassis with the requested physical network).2) Filter the available chassis accordingly to the routersavailability zone hints (if present)If the logical router port belongs to a tunnelled network, there won'tbe any candidate."""# TODO(lucasagomes): Simplify the logic here, the CMS option has# been introduced long ago and by now all gateway chassis should# include it. This will match the logic in the is_gateway_chassis()# (utils.py)cms = cms or self._sb_idl.get_gateway_chassis_from_cms_options()chassis_physnets = (chassis_physnets orself._sb_idl.get_chassis_and_physnets())candidates = set()for chassis, physnets in chassis_physnets.items():if (physnet andphysnet in physnets andchassis in cms):candidates.add(chassis)candidates = list(candidates)# Filter for availability zonesif availability_zone_hints:LOG.debug('Filtering Chassis candidates by availability zone ''hints: %s', ', '.join(availability_zone_hints))candidates = [ch for ch in candidatesfor az in availability_zone_hintsif az in utils.get_chassis_availability_zones(self._sb_idl.lookup('Chassis', ch, None))]LOG.debug('Chassis candidates for scheduling gateway router ports ''for "%s" physical network: %s', physnet, candidates)return candidates

主要的原因是获取到cms列表未空导致无法匹配到合适gateway_chassis将其添加
在这里插入图片描述解决办法有两个

  1. 不需要修改源代码,去添加一个cms标记,让代码那个获取到,但是由于我是第一次遇到这个情况,我不知道要设置什么样的cms标记。所以无法从这方面入手。
  2. 修该源代码去添加一个处理cms列表为空的逻辑
    添加一个处理cms列表为空的逻辑,代码如下:
def get_candidates_for_scheduling(self, physnet, cms=None, chassis_physnets=None, availability_zone_hints=None):"""Return chassis for scheduling gateway router.Criteria for selecting chassis as candidates:1) Chassis from cms with proper bridge mappings only (that means thesegateway chassis with the requested physical network).2) Filter the available chassis accordingly to the routersavailability zone hints (if present)If the logical router port belongs to a tunnelled network, there won'tbe any candidate."""cms = cms or self._sb_idl.get_gateway_chassis_from_cms_options()chassis_physnets = chassis_physnets or self._sb_idl.get_chassis_and_physnets()candidates = set()# If CMS is empty, we may assume all chassis are managedmanaged_chassis = cms if cms else [chassis for chassis in chassis_physnets]for chassis in managed_chassis:physnets = chassis_physnets.get(chassis, [])if physnet in physnets:candidates.add(chassis)# Convert candidates set to listcandidates = list(candidates)# Filter for availability zonesif availability_zone_hints:LOG.debug('Filtering Chassis candidates by availability zone hints: %s', ', '.join(availability_zone_hints))filtered_candidates = []for ch in candidates:azs = utils.get_chassis_availability_zones(self._sb_idl.lookup('Chassis', ch, None))if any(az in azs for az in availability_zone_hints):filtered_candidates.append(ch)candidates = filtered_candidatesLOG.debug('Chassis candidates for scheduling gateway router ports for "%s" physical network: %s', physnet, candidates)return candidates

修改完成后重启一下neutron服务即可。

问题二 分离卷一直显示分离中

问题描述

创建了一个10G的卷
在这里插入图片描述连接到实例
在这里插入图片描述在这里插入图片描述
进行分离卷
在这里插入图片描述
在这里插入图片描述

解决办法(不太严谨)

根据日志提示

2024-05-27 20:08:29.656 59902 ERROR cinder.volume.api [req-e5dea5da-9565-4e0e-b05b-9dbc58f7deef req-87c34a80-75b3-4bdd-87bf-1136cbb88b96 950f09833b4e4dffaf4acf3ac9f1d4bd 840a040edf78409f92d7c7a128652718 - - default default] Detected user call to delete in-use attachment. Call must come from the nova service and nova must be configured to send the service token. Bug #2004555
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault [req-e5dea5da-9565-4e0e-b05b-9dbc58f7deef req-87c34a80-75b3-4bdd-87bf-1136cbb88b96 950f09833b4e4dffaf4acf3ac9f1d4bd 840a040edf78409f92d7c7a128652718 - - default default] Caught error: <class 'cinder.exception.ConflictNovaUsingAttachment'> Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API: cinder.exception.ConflictNovaUsingAttachment: Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault Traceback (most recent call last):
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/middleware/fault.py", line 84, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return req.get_response(self.application)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/osprofiler/web.py", line 111, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return request.get_response(self.application)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/keystonemiddleware/auth_token/__init__.py", line 340, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     response = req.get_response(self._app)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1313, in send
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     status, headers, app_iter = self.call_application(
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/request.py", line 1278, in call_application
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     app_iter = application(self.environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/routes/middleware.py", line 153, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     response = self.app(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 143, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return resp(environ, start_response)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 129, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     resp = self.call_func(req, *args, **kw)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/webob/dec.py", line 193, in call_func
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self.func(req, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 839, in __call__
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return self._process_stack(request, action, action_args,
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 900, in _process_stack
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     action_result = self.dispatch(meth, request, action_args)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 995, in dispatch
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return method(req=request, **action_args)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/openstack/wsgi.py", line 1160, in version_select
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     return func.func(self, *args, **kwargs)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/api/v3/attachments.py", line 282, in delete
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     attachments = self.volume_api.attachment_delete(context, attachment)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/volume/api.py", line 2668, in attachment_delete
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     self.attachment_deletion_allowed(ctxt, attachment)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault   File "/usr/local/lib/python3.9/site-packages/cinder/volume/api.py", line 2659, in attachment_deletion_allowed
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault     raise exception.ConflictNovaUsingAttachment(instance_id=server_id)
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault cinder.exception.ConflictNovaUsingAttachment: Detach volume from instance 4164eba5-b07e-4546-8d41-c4cdc030c396 using the Compute API
2024-05-27 20:08:29.656 59902 ERROR cinder.api.middleware.fault

提示我using the Compute API
于是我去设置如下的内容
controller节点

vim /etc/nova/nova.conf
[cinder]
send_service_user_token = True #添加

compute节点

vim /etc/nova/nova.conf
[cinder]
send_service_user_token = True #添加

但是没有解决,还是提示同样的问题
于是去查看源代码
在/usr/local/lib/python3.9/site-packages/cinder/volume/api.py
源代码如下

def attachment_deletion_allowed(self,ctxt: context.RequestContext,attachment_or_attachment_id,volume=None):"""Check if deleting an attachment is allowed (Bug #2004555)Allowed is based on the REST API policy, the status of the attachment,where it is used, and who is making the request.Deleting an attachment on the Cinder side while leaving the volumeconnected to the nova host results in leftover devices that can lead todata leaks/corruption.OS-Brick may have code to detect it, but in some cases it is detectedafter it has already been exposed, so it's better to prevent users frombeing able to intentionally triggering the issue."""# It's ok to delete an attachment if the request comes from a serviceif self.is_service_request(ctxt):returnif not attachment_or_attachment_id and volume:if not volume.volume_attachment:returnif len(volume.volume_attachment) == 1:attachment_or_attachment_id = volume.volume_attachment[0]if isinstance(attachment_or_attachment_id, str):try:attachment = objects.VolumeAttachment.get_by_id(ctxt, attachment_or_attachment_id)except exception.VolumeAttachmentNotFound:attachment = Noneelse:attachment = attachment_or_attachment_idif attachment:if volume:if volume.id != attachment.volume_id:raise exception.InvalidInput(reason='Mismatched volume and attachment')server_id = attachment.instance_uuid# It's ok to delete if it's not connected to a vm.if not server_id or not attachment.connection_info:returnvolume = volume or attachment.volumenova = compute.API()LOG.info('Attachment connected to vm %s, checking data on nova',server_id)# If nova is down the client raises 503 and we report thattry:nova_volume = nova.get_server_volume(ctxt, server_id,volume.id)except nova.NotFound:LOG.warning('Instance or volume not found on Nova, deleting ''attachment locally, which may leave leftover ''devices on Nova compute')returnif nova_volume.attachment_id != attachment.id:LOG.warning('Mismatch! Nova has different attachment id (%s) ''for the volume, deleting attachment locally. ''May leave leftover devices in a compute node',nova_volume.attachment_id)returnelse:server_id = ''LOG.error('Detected user call to delete in-use attachment. Call must ''come from the nova service and nova must be configured to ''send the service token. Bug #2004555')raise exception.ConflictNovaUsingAttachment(instance_id=server_id)

添加一个逻辑处理,通过实例的uuid再一次确认它是否有附加卷

instance_uuid = attachment.instance_uuid
try:attachments = objects.VolumeAttachmentList.get_all_by_instance_uuid(ctxt, instance_uuid)if attachments:LOG.info("Instance {} has other attachments: {}".format(instance_uuid, [att.id for att in attachments]))else:LOG.info("No other attachments found for instance {}".format(instance_uuid))return
except Exception as e:LOG.error("Failed to retrieve attachments for instance {}: {}".format(instance_uuid, str(e)))raise exception.VolumeBackendAPIException(reason=str(e))

修改后的完整的代码如下

def attachment_deletion_allowed(self,ctxt: context.RequestContext,attachment_or_attachment_id,volume=None):"""Check if deleting an attachment is allowed (Bug #2004555)Allowed is based on the REST API policy, the status of the attachment,where it is used, and who is making the request.Deleting an attachment on the Cinder side while leaving the volumeconnected to the nova host results in leftover devices that can lead todata leaks/corruption.OS-Brick may have code to detect it, but in some cases it is detectedafter it has already been exposed, so it's better to prevent users frombeing able to intentionally triggering the issue."""# It's ok to delete an attachment if the request comes from a serviceif self.is_service_request(ctxt):returnif not attachment_or_attachment_id and volume:if not volume.volume_attachment:returnif len(volume.volume_attachment) == 1:attachment_or_attachment_id = volume.volume_attachment[0]if isinstance(attachment_or_attachment_id, str):try:attachment = objects.VolumeAttachment.get_by_id(ctxt, attachment_or_attachment_id)except exception.VolumeAttachmentNotFound:attachment = Noneelse:attachment = attachment_or_attachment_idif attachment:if volume:if volume.id != attachment.volume_id:raise exception.InvalidInput(reason='Mismatched volume and attachment')server_id = attachment.instance_uuid# It's ok to delete if it's not connected to a vm.if not server_id or not attachment.connection_info:returnvolume = volume or attachment.volumenova = compute.API()LOG.info('Attachment connected to vm %s, checking data on nova',server_id)# If nova is down the client raises 503 and we report thattry:nova_volume = nova.get_server_volume(ctxt, server_id,volume.id)except nova.NotFound:LOG.warning('Instance or volume not found on Nova, deleting ''attachment locally, which may leave leftover ''devices on Nova compute')returnif nova_volume.attachment_id != attachment.id:LOG.warning('Mismatch! Nova has different attachment id (%s) ''for the volume, deleting attachment locally. ''May leave leftover devices in a compute node',nova_volume.attachment_id)returnelse:server_id = ''instance_uuid = attachment.instance_uuidtry:attachments = objects.VolumeAttachmentList.get_all_by_instance_uuid(ctxt, instance_uuid)if attachments:LOG.info("Instance {} has other attachments: {}".format(instance_uuid, [att.id for att in attachments]))else:LOG.info("No other attachments found for instance {}".format(instance_uuid))returnexcept Exception as e:LOG.error("Failed to retrieve attachments for instance {}: {}".format(instance_uuid, str(e)))raise exception.VolumeBackendAPIException(reason=str(e))

最终成功解决,但是这个方法不是很严谨

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/16887.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Host头攻击-使用加密和身份验证机制

使用加密和身份验证机制&#xff0c;即安装合适的安全工具和软件&#xff0c;是确保Web服务器安全性的重要步骤。这种方法涉及使用各种安全工具来检测、预防、监控和响应潜在的安全威胁。以下是对第6种方法的详细讲解&#xff0c;包括一些常见的安全工具和软件的示例。 1. 防火…

spring boot3整合邮件服务实现邮件发送功能

⛰️个人主页: 蒾酒 &#x1f525;系列专栏&#xff1a;《spring boot实战》 目录 内容概要 开通服务 依赖引入 配置属性 创建邮件发送工具类 测试 最近发现了一个巨牛的人工智能学习网站&#xff0c;通俗易懂&#xff0c;风趣幽默&#xff0c;忍不住分享一下给大家…

【C++】每日一题 50 Pow(x,n)

实现 pow(x, n) &#xff0c;即计算 x 的整数 n 次幂函数&#xff08;即&#xff0c;x^n &#xff09;。 当需要计算x的n次幂时&#xff0c;可以使用递归或者迭代的方式来实现。 #include <iostream>double myPow(double x, int n) {if (n 0) {return 1.0;} else if (…

Nginx日志管理与分析:从日志中挖掘价值

一、引言 Nginx作为一款高性能的HTTP和反向代理服务器&#xff0c;在Web服务中扮演着至关重要的角色。除了其强大的功能外&#xff0c;Nginx还提供了丰富的日志功能&#xff0c;可以帮助我们监控和分析Web服务的运行状态。然而&#xff0c;仅仅收集日志是远远不够的&#xff0…

c++ 里重解释转换之于引用 reinterpret_cast< long >

今天遇到了这一很新奇的写法。模糊中记得王老师也这么讲过。c 里四大转换。把数据重解释为原来数据的引用。虽然也可以直接定义对变量的引用。测试如下&#xff1a; 咱们从反汇编再了解下 c 编译器是怎么处理这种写法的&#xff1a; 谢谢

[合集] MySQL 8.x 系列文章清单

↑ 关注“少安事务所”公众号&#xff0c;欢迎⭐收藏&#xff0c;不错过精彩内容~ 从去年7月到现在&#xff0c;自 MySQL 发版模型变更后&#xff0c;已经发布了四个版本&#xff0c;意味着 MySQL 8.x 系列进入了长期支持状态。 当然&#xff0c;目前主要推荐的版本依旧是 MySQ…

【代码随想录训练营】【Day 35】【贪心-2】| Leetcode 122, 55, 45

【代码随想录训练营】【Day 35】【贪心-2】| Leetcode 122, 55, 45 需强化知识点 贪心&#xff1a;跳跃游戏 题目 122. 买卖股票的最佳时机 II 动态规划贪心&#xff1a;只要股票第二天涨了&#xff0c;前一天就买&#xff0c;第二就买 class Solution:def maxProfit(sel…

three.js官方案例webgl_loader_fbx.html学习

目录 1.1 添加库引入 1.2 添加必要的组件scene,camera,webrenderer等 1.3 模型加载 1.4 半球光 1.5 动画 1.6 换个自己的fbx模型 1.7 fbx模型和fbx动画关联 1.7 html脚本全部如下 1.8 fbx.js全部脚本如下 1.1 添加库引入 import * as THREE from three; import Stats …

AI芯片软件定义硬件架构

软件定义硬件架构 AI 应用正促使芯片制造商和 OEM 重新审视重新配置硬件的可能性。 摩尔定律放缓&#xff0c;软件应用复杂性和规模激增&#xff0c;x86架构CPU运行通用软件的传统方法已无法满足嵌入式和AI应用的高效需求。 在当前x86架构主导的环境中&#xff0c;软硬件间差…

在某云服务器上搭建公网kali linux2.0

前提&#xff1a; 可用的 CVM 实例 挂载一个系统盘之外的盘&#xff0c;安装完成后可卸载&#xff01; 创建实例&#xff0c;安装centos7系统&#xff01; 然后执行fdisk -l看磁盘的情况 在这里我将把镜像写入vdb这块数据盘 非 root 的情况下记得sudo执行以下命令 注意&…

使用 Elastic AI assistant for Observability 来分析日志

在今天的文章中&#xff0c;我们来参考之前的文章 “Elastic AI Assistant for Observability 和 Microsoft Azure OpenAI 入门” 来使用 Elastic AI assistant 分析日志。在本文章中&#xff0c;我们不使用 Azure clould。这样我们之间来进入主题&#xff0c;以免失去注意力。…

DDR、LPDDR和GDDR的区别

1、概况 以DDR开头的内存适用于服务器、云计算、网络、笔记本电脑、台式机和消费类应用&#xff0c;支持更宽的通道宽度、更高的密度和不同的形状尺寸。 以LPDDR开头的内存适合面向移动和汽车这些对规格和功耗非常敏感的领域&#xff0c;提供更窄的通道宽度和多种低功耗运行状态…

OSPF减少LSA更新量1

OSPF的LSA优化 一、汇总——优化骨干区域 (1)域间汇总ABR设备基于某个区域的1/2类LSA计算所得的最佳路由&#xff0c;共享给其他区域时&#xff0c;进行汇总传递。 [r2]ospf 1 [r2-ospf-1]area 1——明细路由所在区域&#xff0c;该ABR设备必须和明细路由在同一区域 [r2-ospf…

1738. 找出第 K 大的异或坐标值 Medium

给你一个二维矩阵 matrix 和一个整数 k &#xff0c;矩阵大小为 m x n 由非负整数组成。 矩阵中坐标 (a, b) 的 目标值 可以通过对所有元素 matrix[i][j] 执行异或运算得到&#xff0c;其中 i 和 j 满足 0 < i < a < m 且 0 < j < b < n&#xff08;下标从 …

数据集007:垃圾分类数据集(含数据集下载链接)

数据集简介 本数据拥有 训练集&#xff1a;43685张&#xff1b; 验证集&#xff1a;5363张&#xff1b; 测试集&#xff1a;5363张&#xff1b; 总类别数&#xff1a;158类。 部分代码&#xff1a; 定义数据集 class MyDataset(Dataset):def __init__(self, modetrain, …

25台es集群停止步骤

停止切割服务 使用Kibana Dev Tools 打开Kibana&#xff0c;导航到Dev Tools页面。在Console标签页中&#xff0c;执行以下命令来临时禁止分片的自动分配 Json 1PUT _cluster/settings 2{ 3 "transient": { 4 "cluster.routing.allocation.enable":…

win10/win11 优先调用大核的电源计划性能设置

前言 大小核&#xff0c;即Intel 12代开始的P-core&#xff08;性能核&#xff0c;一般叫大核&#xff09;和E-core&#xff08;能效核&#xff0c;一般叫小核&#xff09;异核架构。说下个人理解&#xff0c;就是英特尔为了增加cpu性能&#xff0c;但是又因为架构和功耗的限制…

网络通讯聊天工具的实现

学习网络与通信&#xff0c;实现聊天界面能够通过服务器进行私聊和群聊的功能。 1.服务器&#xff1a;ServeSocket 客户端先发送消息给服务器&#xff0c;服务器接受消息后再发送给客户端。 利用服务器随时监听。等待客户端的请求&#xff0c;一旦有请求便生产一个socket套接…

白杨SEO:为什么任何“创业”都要先找需求?以自己大学真实故事举例

创业&#xff0c;一般理解&#xff0c;狭义讲是指创办了个企业&#xff0c;广义是指创造一番事业。图片在公号白杨SEO上看。 我之所以把“创业”加了个双引号&#xff0c;除了上面狭义或者广义之外&#xff0c;我觉得像个体工作室、个人IP、自由职业甚至线下各类路边摊也可以算…

解决mybatis拦截器注入依赖后为null问题

需求是在mybatis拦截器中注入RedisUtils用来缓存一些信息。 拦截器 Component Intercepts({Signature(type Executor.class, method "update", args {MappedStatement.class, Object.class}) }) public class MybatisInterceptor implements Interceptor {priva…