AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-345035

mangusbrother's questions

Martin Hope
mangusbrother
Asked: 2021-11-26 13:31:40 +0800 CST

terraform apply error alreadyExists on untouched resources

  • 0

我正在按照官方指南开始一个新的 terraform 项目:

https://learn.hashicorp.com/tutorials/terraform/gke?in=terraform/kubernetes&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS&_ga=2.91746777.2118895439.1637849824-960084622.1637849824

我设法让它运行。(我将它作为提交时触发的谷歌云构建任务的一部分运行)

但是,如果我更改资源中的某些内容(例如,我将“gke_num_nodes”默认值从 2 替换为 1),当我terraform apply再次运行时,这就是我得到的:


Plan: 4 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + kubernetes_cluster_host = (known after apply)
  + kubernetes_cluster_name = "workspace-auto-gke"
  + project_id              = "workspace-auto"
  + region                  = "europe-west4"
google_compute_network.vpc: Creating...
╷
│ Error: Error creating Network: googleapi: Error 409: The resource 'projects/workspace-auto/global/networks/workspace-auto-vpc' already exists, alreadyExists
│ 
│   with google_compute_network.vpc,
│   on vpc.tf line 15, in resource "google_compute_network" "vpc":
│   15: resource "google_compute_network" "vpc" {
│ 
╵

有没有办法让它不尝试重新创建现有的未触及资源?

我cloudbuild.json的如下:

{
  "steps": [
    {
      "name": "hashicorp/terraform",
      "entrypoint": "/bin/sh",
      "args": [
        "./cloudbuild/prepare-terraform.sh"
      ]
    }
  ],
  "logsBucket": "gs://my-bucket/logdir",
  "serviceAccount": "projects/my-proj/serviceAccounts/[email protected]"
}

prepare-terraform.sh简单地

terraform init
terraform plan
terraform apply -auto-approve
google-cloud-platform google-compute-engine terraform google-kubernetes-engine
  • 2 个回答
  • 4299 Views
Martin Hope
mangusbrother
Asked: 2019-05-02 06:11:11 +0800 CST

格式化外置硬盘卡住

  • 0

我有一个外部 2TB 硬盘,我计划将其连接到我的 ubuntu 服务器。我正在尝试将其格式化为 ext4 但遇到问题

我当前的设置是服务器(sdb)中的 200gb ssd,Raid0 的 2x2TB 硬盘(sdc,sdd),以及我正在尝试格式化的外部硬盘(sda)

ubnt@ubnt:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
[sudo] password for ubnt:
NAME              FSTYPE              SIZE MOUNTPOINT LABEL
sda                                   1.8T
sdb                                 111.8G
├─sdb1            ext4                976M /boot
├─sdb2                                  1K
└─sdb5            LVM2_member       110.9G
  ├─ubnt--vg-root ext4              103.2G /
  └─ubnt--vg-swap swap                7.6G [SWAP]
sdc               linux_raid_member   1.8T            ubnt:0
└─md0             ext4                3.7T /mnt/md0
sdd               linux_raid_member   1.8T            ubnt:0
└─md0             ext4                3.7T /mnt/md0

当我尝试在硬盘上创建 ext4 文件系统时,它在“Writing superblock ... 730/14905”(总是相同的数字)处卡住了很长时间,然后出现错误:

ubnt@ubnt:~$ sudo mkfs.ext4 -F /dev/sda
mke2fs 1.44.1 (24-Mar-2018)
Found a dos partition table in /dev/sda
Creating filesystem with 488378112 4k blocks and 122101760 inodes
Filesystem UUID: bcca6fda-7429-41c2-9cba-31705fe1d791
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information:   730/14905
Warning, had trouble writing out superblocks.

我试过sudo smartctl -a /dev/sda了,但没有出错。

我该怎么做才能使这张光盘可用?

ubuntu
  • 1 个回答
  • 6918 Views
Martin Hope
mangusbrother
Asked: 2019-04-23 07:48:14 +0800 CST

ubuntu 使用 apt 升级 apt 冲突

  • 0

我有一个无处不在的 xg 服务器,我刚刚从 ubuntu 16 升级到 18

我注意到很多东西被禁用主要是因为是 3rd 方回购。我重新启用了我拥有的那些并开始启用我所有的软件。

但是,我收到此错误:

ubnt@ubnt:/tmp$ sudo apt-get install mongodb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-server but it is not going to be installed
               Depends: mongodb-org-mongos but it is not going to be installed
               Depends: mongodb-org-tools but it is not going to be installed
               Conflicts: mongodb-server but 1:3.6.3-0ubuntu1.1 is to be installed
 mongodb-org-shell : Conflicts: mongodb-server but 1:3.6.3-0ubuntu1.1 is to be installed
 mongodb-server : Depends: mongodb-clients but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
ubnt@ubnt:/tmp$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-server but it is not installed
               Depends: mongodb-org-mongos but it is not installed
               Depends: mongodb-org-tools but it is not installed
 unifi-video : Depends: mongodb-10gen (>= 2.4.10) but it is not installable or
                        mongodb-org-server (>= 2.6.0) but it is not installed or
                        mongodb-server (>= 2.4.9) but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
ubnt@ubnt:/tmp$ sudo apt --fix-broken install                                                  Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libboost-filesystem1.65.1 libboost-iostreams1.65.1 libboost-program-options1.65.1
  libboost-system1.65.1 libstemmer0d mongo-tools mongodb-server-core
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/63.1 MB of archives.
After this operation, 226 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 111690 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.0.9_amd64.deb ...
Unpacking mongodb-org-server (4.0.9) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.0.9_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.0.9_amd64.deb ...
Unpacking mongodb-org-mongos (4.0.9) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.0.9_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.3-0ubuntu1.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.0.9_amd64.deb ...
Unpacking mongodb-org-tools (4.0.9) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.0.9_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.0.9_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.0.9_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.0.9_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我注意到了兴趣:Conflicts: mongodb-server but 1:3.6.3-0ubuntu1.1 is to be installed

我该如何解决这个问题?

apt
  • 1 个回答
  • 508 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve