Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
L
lxc
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • lxc
  • Repository

Switch branch/tag
  • lxc
  • src
  • tests
  • lxc-test-cloneconfig
Find file
BlameHistoryPermalink
  • Serge Hallyn's avatar
    config: fix the handling of lxc.hook and hwaddrs in unexpanded config · 67702c21
    Serge Hallyn authored Sep 01, 2014
    And add a testcase.
    
    The code to update hwaddrs in a clone was walking through the container
    configuration and re-printing all network entries.  However network
    entries from an include file which should not be printed out were being
    added to the unexpanded config.  With this patch, at clone we simply
    update the hwaddr in-place in the unexpanded configuration file, making
    sure to make the same update to the expanded network configuration.
    
    The code to update out lxc.hook statements had the same problem.
    We also update it in-place in the unexpanded configuration, though
    we mirror the logic we use when updating the expanded configuration.
    (Perhaps that should be changed, to simplify future updates)
    
    This code isn't particularly easy to review, so testcases are added
    to make sure that (1) extra lxc.network entries are not added (or
    removed), even if they are present in an included file, (2) lxc.hook
    entries are not added, (3) hwaddr entries are updated, and (4)
    the lxc.hook entries are properly updated (only when they should be).
    Reported-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    67702c21
lxc-test-cloneconfig 3.37 KB
EditWeb IDE
×

Replace lxc-test-cloneconfig

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.