腾讯云工单中的工程师很水?

vps网友提供 11-13 讨论归档 19
想修改腾讯云中的 /etc/hosts,打开提示
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.0.1 localhost.localdomain VM-0-4-ubuntu
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

各种改,重启都失效,然后提了一个工单,腾讯云工程师回复:
您好:
ubuntu 是普通用户应该没有该文件写权限;
建议您提权使用编辑命令,使用命令:sudo vim /etc/hosts

我也是醉了

本文由 vps网友提供,转载请注明出处

本文链接: https://www.vpsvsvps.com/discuss/a/1676471947426271232.html

标签:
root0day
11-19

经常 你在工单后面加一句 请直接转工程师就完事了 没有客服愿意自讨苦吃

mydns
11-17

我一个问题工单前前后后折腾了 4 天还没有解决

liuxu
11-16

@liuxu

2 说错了,应该是修改 /etc/cloud/cloud.cfg 配置全局配置文件或用 cloud-config 命令修改用户配置

liuxu
11-16

这个大概的意思就是,你在 /etc/cloud/cloud.cfg or cloud-config 配置文件中打开了 manage_etc_hosts 属性,如果你想改 host 文件,二选一:
1.直接更改 /etc/cloud/templates/hosts.tmpl
这样重启就会用 hosts.tmpl 覆盖 /etc/hosts

2.删除 /etc/cloud/cloud.cfg or cloud-config 配置文件中的 manage_etc_hosts 属性,然后改 host
这样你修改了 /etc/hosts 就不会被 hosts.tmpl 覆盖

julyclyde
11-16

@Bisn 俩都 404 呢

你就按照 cloud-init 来改然后重启动吧

Bisn
11-15

@julyclyde 见上面回复的图片吧

Bisn
11-15

@ZL122320
@workworld 我就是修改相关的文件,重启后还是被还原了,才提交的工单
见图片,是重启后的截图
[![tx.png]( https://i.loli.net/2018/11/15/5bed1936973e0.png)]( https://i.loli.net/2018/11/15/5bed1936973e0.png)

lannyst
11-14

据我观察这个工单被一线比较水的派单员拦截了,没流转到二线的工程师手里……

julyclyde
11-14

一是 lz 不看注释也不懂 cloud-init
二是居然连客服也不懂 cloud-init

19zero
11-14

腾讯云客服不都是外包的么?

workworld
11-13

六楼老哥说的没错,归根结底是你不太了解 cloud-init 的工作原理,云上的机器都有这个组件的,我用的阿里的机器,刚开始也不清楚怎么改,后台仔细看了边 hosts 文件后,才发现人家已经说的非常明白了 ,唉 这能怪谁呢

ZL122320
11-13

# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl 文件里写的这么清楚你还要问,你也是水的够了多学学把孩子

ZL122320
11-13

# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl 文件里写的这么清楚你还要问,你也是水的够了

SSyang
11-13

云环境一般会使用开源的 Cloud-init 进行一些初始化操作,实例每次启动时 Cloud-Init 会根据 /etc/cloud/templates/hosts.${os_type}.tmpl 模板生成一份新的 /etc/hosts 文件覆盖原有的 /etc/hosts。如果想要重启后不失效,需要同时修改 /etc/hosts 与对应的模板文件 hosts.tmpl。

xi2008wang
11-13

网易云解释比较清楚。。。https://www.163yun.com/help/documents/56874406220320768
搜索了一下 https://cloudinit.readthedocs.io/en/latest/topics/modules.html 对 cloud-init 有介绍
This module will update the contents of /etc/hosts based on the hostname/fqdn specified in config. Management of /etc/hosts is controlled using manage_etc_hosts. If this is set to false, cloud-init will not manage /etc/hosts at all. This is the default behavior.

xi2008wang
11-13

ls /etc/cloud/templates/ 看一下有那些文件, /etc/cloud/cloud.cfg 的内容是什么

Bisn
11-13

@pwrliang 就因为按照提示,各种改都没用才提交的工单

geminil
11-13

有点。。。
有时候常年回复,牛头不对马嘴的

pwrliang
11-13

那个文件不是提示你,如果想 persist,需要修改以下两个。